Avoid bsd.files.mk duplicate rule warning for bfd ldscripts

Without this change I get lots of
warning: duplicate script for target "_FILESINS_ldscripts/elf64btsmip_fbsd.xw" ignored
message for every tree walk.

Reviewed By:	imp, emaste
Differential Revision: https://reviews.freebsd.org/D18783
This commit is contained in:
Alex Richardson 2019-01-09 11:13:05 +00:00
parent 4cea05a273
commit 985b8e2b12
2 changed files with 6 additions and 3 deletions

View File

@ -63,6 +63,9 @@ FILESDIR= ${SCRIPTDIR}
HOST= ${TARGET_TUPLE}
LIBSEARCHPATH= \"=/lib\":\"=/usr/lib\"
.for ext in ${ELF_SCR_EXT}
.if !empty(LDSCRIPTS) && ${LDSCRIPTS:M${NATIVE_EMULATION}.${ext}} != ""
.error "NATIVE_EMULATION scripts were added to LDSCRIPTS: ${LDSCRIPTS:M${NATIVE_EMULATION}.${ext}}"
.endif
LDSCRIPTS+= ${NATIVE_EMULATION}.${ext}
ldscripts/${NATIVE_EMULATION}.${ext}: e${NATIVE_EMULATION}.c
.endfor

View File

@ -18,14 +18,14 @@ NATIVE_EMULATION?=elf32${_EMULATION_ENDIAN}tsmip_fbsd
MIPS_ABIS=elf32btsmip_fbsd elf32ltsmip_fbsd elf64btsmip_fbsd elf64ltsmip_fbsd \
elf32btsmipn32_fbsd elf32ltsmipn32_fbsd
.for abi in ${MIPS_ABIS}
#.if (${abi} != ${NATIVE_EMULATION})
EMS+= ${abi}
#.endif
.if ${abi} != ${NATIVE_EMULATION}
.for ext in ${ELF_SCR_EXT}
LDSCRIPTS+= ${abi}.${ext}
ldscripts/${abi}.${ext}: e${abi}.c
.endfor
SRCS+= e${abi}.c
.endif
SRCS+= e${abi}.c
CLEANFILES+= e${abi}.c
# nb: elf32 handles both elf32 and elf64 targets
e${abi}.c: ${.CURDIR}/${abi}.sh emultempl/elf32.em \