Index: head/gnu/usr.bin/binutils/ld/Makefile =================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile (revision 288232) +++ head/gnu/usr.bin/binutils/ld/Makefile (revision 288233) @@ -1,74 +1,75 @@ # $FreeBSD$ ELF_SCR_EXT= x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw .include "../Makefile.inc0" .include .PATH: ${SRCDIR}/ld PROG= ld SCRIPTDIR= /usr/libdata/ldscripts SRCS+= ldcref.c \ ldctor.c \ ldemul-list.h \ ldemul.c \ ldexp.c \ ldfile.c \ ldgram.y \ ldlang.c \ ldlex.l \ ldmain.c \ ldmisc.c \ ldver.c \ ldwrite.c \ lexsup.c \ mri.c CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\" CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\" CFLAGS+= -DSCRIPTDIR=\"${TOOLS_PREFIX}/usr/libdata\" CFLAGS+= -DBFD_VERSION_STRING=\"${VERSION}\" CFLAGS+= -DBINDIR=\"${BINDIR}\" .if defined(TOOLS_PREFIX) CFLAGS+= -DTARGET_SYSTEM_ROOT=\"${TOOLS_PREFIX}\" .else CFLAGS+= -DTARGET_SYSTEM_ROOT=\"/\" .endif CFLAGS+= -DTOOLBINDIR=\"${TOOLS_PREFIX}/${BINDIR}/libexec\" CFLAGS+= -D_GNU_SOURCE CFLAGS+= -I${SRCDIR}/ld -I${SRCDIR}/bfd .if ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?= yes .endif DPADD= ${RELTOP}/libbfd/libbfd.a DPADD+= ${RELTOP}/libiberty/libiberty.a LDADD= ${DPADD} CLEANDIRS+= ldscripts CLEANFILES+= ldemul-list.h stringify.sed FILES= ${LDSCRIPTS:S|^|ldscripts/|} FILESDIR= ${SCRIPTDIR} HOST= ${TARGET_TUPLE} LIBSEARCHPATH= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\" .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${NATIVE_EMULATION}.${ext} +ldscripts/${NATIVE_EMULATION}.${ext}: e${NATIVE_EMULATION}.c .endfor EMXFR= EMLST= .for _e in ${NATIVE_EMULATION} ${EMS} EMXFR+= extern ld_emulation_xfer_type ld_${_e}_emulation; EMLST+= &ld_${_e}_emulation, .endfor ldemul-list.h: echo "${EMXFR}" > ${.TARGET} echo "#define EMULATION_LIST ${EMLST} 0" >> ${.TARGET} stringify.sed: ln -sf ${SRCDIR}/ld/emultempl/astring.sed ${.TARGET} GENDIRDEPS_FILTER.host+= Nusr.bin/yacc .include Index: head/gnu/usr.bin/binutils/ld/Makefile.amd64 =================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.amd64 (revision 288232) +++ head/gnu/usr.bin/binutils/ld/Makefile.amd64 (revision 288233) @@ -1,28 +1,29 @@ # $FreeBSD$ NATIVE_EMULATION= elf_x86_64_fbsd SRCS+= e${NATIVE_EMULATION}.c CLEANFILES+= e${NATIVE_EMULATION}.c e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSEARCHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} X86_EMULATION= elf_i386_fbsd _i386_path= \"${TOOLS_PREFIX}/usr/lib32\" EMS+= ${X86_EMULATION} .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${X86_EMULATION}.${ext} +ldscripts/${X86_EMULATION}.${ext}: e${X86_EMULATION}.c .endfor SRCS+= e${X86_EMULATION}.c CLEANFILES+= e${X86_EMULATION}.c e${X86_EMULATION}.c: emulparams/${X86_EMULATION}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_i386_path} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${X86_EMULATION} "" no ${X86_EMULATION} ${TARGET_TUPLE} Index: head/gnu/usr.bin/binutils/ld/Makefile.mips =================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.mips (revision 288232) +++ head/gnu/usr.bin/binutils/ld/Makefile.mips (revision 288233) @@ -1,36 +1,37 @@ # $FreeBSD$ .if ${TARGET_ARCH:Mmips*el} != "" _EMULATION_ENDIAN=l .else _EMULATION_ENDIAN=b .endif .if ${TARGET_ARCH:Mmips64*} != "" NATIVE_EMULATION=elf64${_EMULATION_ENDIAN}tsmip_fbsd .elif ${TARGET_ARCH:Mmipsn32*} != "" NATIVE_EMULATION=elf32${_EMULATION_ENDIAN}tsmipn32_fbsd .else NATIVE_EMULATION?=elf32${_EMULATION_ENDIAN}tsmip_fbsd .endif 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 .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${abi}.${ext} +ldscripts/${abi}.${ext}: e${abi}.c .endfor 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 \ scripttempl/elf.sc genscripts.sh stringify.sed sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSEARCHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${abi} "" no ${abi} ${TARGET_TUPLE} \ ${.CURDIR}/${abi}.sh .endfor Index: head/gnu/usr.bin/binutils/ld/Makefile.powerpc64 =================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.powerpc64 (revision 288232) +++ head/gnu/usr.bin/binutils/ld/Makefile.powerpc64 (revision 288233) @@ -1,29 +1,30 @@ # $FreeBSD$ NATIVE_EMULATION= elf64ppc_fbsd SRCS+= e${NATIVE_EMULATION}.c CLEANFILES+= e${NATIVE_EMULATION}.c e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed ldemul-list.h sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSEARCHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} PPC32_EMULATION= elf32ppc_fbsd _ppc32_path= \"${TOOLS_PREFIX}/usr/lib32\" EMS+= ${PPC32_EMULATION} .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${PPC32_EMULATION}.${ext} +ldscripts/${PPC32_EMULATION}.${ext}: e${PPC32_EMULATION}.c .endfor SRCS+= e${PPC32_EMULATION}.c CLEANFILES+= e${PPC32_EMULATION}.c e${PPC32_EMULATION}.c: emulparams/${PPC32_EMULATION}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed ldemul-list.h sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_ppc32_path} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${PPC32_EMULATION} "" no ${PPC32_EMULATION} ${TARGET_TUPLE} Index: head/gnu/usr.bin/binutils/ld/Makefile.sparc64 =================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.sparc64 (revision 288232) +++ head/gnu/usr.bin/binutils/ld/Makefile.sparc64 (revision 288233) @@ -1,31 +1,32 @@ # $FreeBSD$ NATIVE_EMULATION= elf64_sparc_fbsd SRCS+= e${NATIVE_EMULATION}.c CLEANFILES+= e${NATIVE_EMULATION}.c e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSEARCHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} .for BITS in 64 32 EMS+= elf${BITS}_sparc .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= elf${BITS}_sparc.${ext} +ldscripts/elf${BITS}_sparc.${ext}: eelf${BITS}_sparc.c .endfor SRCS+= eelf${BITS}_sparc.c CLEANFILES+= eelf${BITS}_sparc.c eelf${BITS}_sparc.c: emulparams/elf${BITS}_sparc.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSEARCHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ elf${BITS}_sparc "" no elf${BITS}_sparc ${TARGET_TUPLE} .endfor # BITS