diff options
author | obrien <obrien@FreeBSD.org> | 2004-07-08 17:05:34 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2004-07-08 17:05:34 +0000 |
commit | 459a3b439e3c1703207eedea8c7176ab33b36fc9 (patch) | |
tree | 1c11a95e47b818a1dbb2c36dbf6fb0c929474353 /gnu/usr.bin/binutils/ld | |
parent | 344e054ea370e99df8482bf6239c882720887f64 (diff) | |
download | FreeBSD-src-459a3b439e3c1703207eedea8c7176ab33b36fc9.zip FreeBSD-src-459a3b439e3c1703207eedea8c7176ab33b36fc9.tar.gz |
MAJOR cleanup of the Bmake framework.
This includes removing all vestiges of the old not-really supported
ability to build cross tools targeting non-FreeBSD systems, such as
m68k Lynx and NetBSD. Move as much duplicated code from platform
Makefiles into the shared Makefiles. Add a simple mechanism for
specifying ELF 'ldscripts'. Also share as many .h files as possible
(now a single bfd.h vs. one per platform).
Diffstat (limited to 'gnu/usr.bin/binutils/ld')
-rw-r--r-- | gnu/usr.bin/binutils/ld/Makefile | 16 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/ld/Makefile.alpha | 38 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/ld/Makefile.amd64 | 32 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/ld/Makefile.i386 | 42 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/ld/Makefile.ia64 | 23 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/ld/Makefile.m68k | 52 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/ld/Makefile.powerpc | 22 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/ld/Makefile.sparc64 | 29 |
8 files changed, 57 insertions, 197 deletions
diff --git a/gnu/usr.bin/binutils/ld/Makefile b/gnu/usr.bin/binutils/ld/Makefile index f31b1c2..00fba27 100644 --- a/gnu/usr.bin/binutils/ld/Makefile +++ b/gnu/usr.bin/binutils/ld/Makefile @@ -11,6 +11,8 @@ SRCS+= ldcref.c ldctor.c ldemul.c ldemul-list.h ldexp.c ldfile.c \ ldver.c ldwrite.c lexsup.c mri.c WARNS?= 0 # ldemul.h problem (`struct option' declared inside parameter list) +CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\" +CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\" CFLAGS+= -DSCRIPTDIR=\"${TOOLS_PREFIX}/usr/libdata\" CFLAGS+= -DBFD_VERSION_STRING=\"${VERSION}\" CFLAGS+= -DBINDIR=\"${BINDIR}\" -DTARGET_SYSTEM_ROOT=\"${TOOLS_PREFIX}\" @@ -24,14 +26,14 @@ LDADD= ${DPADD} CLEANDIRS+= ldscripts CLEANFILES+= ldemul-list.h stringify.sed -# If set, BINUTILSDISTDIR is the path to a directory containing the full GNU -# binutils release. FreeBSD only distributes the bits that are required to -# build native architectures. BINUTILSDISTDIR is needed to build cross tools. -.if defined(BINUTILSDISTDIR) && exists(${BINUTILSDISTDIR}) -.PATH: ${BINUTILSDISTDIR}/ld -CFLAGS+= -I${BINUTILSDISTDIR}/ld -.endif +HOST= ${TARGET_TUPLE} +LIBSERACHPATH= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\" +ELF_SCR_EXT= x xbn xn xr xs xu xc xsc xd xdc +.for ext in ${ELF_SCR_EXT} +LDSCRIPTS+= ${NATIVE_EMULATION}.${ext} +.endfor +EMS+= ${NATIVE_EMULATION} EMXFR= EMLST= .for _e in ${EMS} diff --git a/gnu/usr.bin/binutils/ld/Makefile.alpha b/gnu/usr.bin/binutils/ld/Makefile.alpha index d10d1a9..59afdb6 100644 --- a/gnu/usr.bin/binutils/ld/Makefile.alpha +++ b/gnu/usr.bin/binutils/ld/Makefile.alpha @@ -1,43 +1,33 @@ # $FreeBSD$ -.if ${TARGET_ARCH} == "alpha" -NATIVE_EMULATION= elf64alpha_fbsd -HOST= ${TARGET_TUPLE} -CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\" -CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\" -_alpha_path= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\" -.else -_alpha_path= \"/usr/cross/alpha-freebsd/usr/lib\" -.endif -EMS+= ${NATIVE_EMULATION} elf64alpha alpha -LDSCRIPTS+= ${NATIVE_EMULATION}.x ${NATIVE_EMULATION}.xbn ${NATIVE_EMULATION}.xn ${NATIVE_EMULATION}.xr \ - ${NATIVE_EMULATION}.xs ${NATIVE_EMULATION}.xu alpha.x alpha.xbn \ - ${NATIVE_EMULATION}.xc ${NATIVE_EMULATION}.xsc \ - ${NATIVE_EMULATION}.xd ${NATIVE_EMULATION}.xdc \ - elf64alpha.x elf64alpha.xbn elf64alpha.xc elf64alpha.xd \ - elf64alpha.xdc elf64alpha.xn elf64alpha.xr elf64alpha.xs \ - elf64alpha.xsc elf64alpha.xu \ - alpha.xn alpha.xr alpha.xu alpha.x alpha.xbn +NATIVE_EMULATION= elf64alpha_fbsd + +EMS+= elf64alpha alpha +.for ext in ${ELF_SCR_EXT} +LDSCRIPTS+= elf64alpha.${ext} +.endfor +LDSCRIPTS+= alpha.x alpha.xbn alpha.xn alpha.xr alpha.xu + SRCS+= e${NATIVE_EMULATION}.c eelf64alpha.c ealpha.c CLEANFILES+= e${NATIVE_EMULATION}.c eelf64alpha.c ealpha.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 ${_alpha_path} \ + scripttempl/elf.sc genscripts.sh stringify.sed + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} -eelf64alpha.c: emulparams/elf64alpha.sh emultempl/elf32.em \ - scripttempl/elf.sc genscripts.sh stringify.sed - sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_alpha_path} \ +eelf64alpha.c: emulparams/elf64alpha.sh emultempl/elf32.em \ + scripttempl/elf.sc genscripts.sh stringify.sed + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${NATIVE_EMULATION} "" no elf64alpha ${TARGET_TUPLE} ealpha.c: emulparams/alpha.sh emultempl/generic.em scripttempl/alpha.sc \ genscripts.sh stringify.sed - sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_alpha_path} \ + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${NATIVE_EMULATION} "" no alpha ${TARGET_TUPLE} diff --git a/gnu/usr.bin/binutils/ld/Makefile.amd64 b/gnu/usr.bin/binutils/ld/Makefile.amd64 index 8c4afe4..bac730d 100644 --- a/gnu/usr.bin/binutils/ld/Makefile.amd64 +++ b/gnu/usr.bin/binutils/ld/Makefile.amd64 @@ -1,20 +1,12 @@ # $FreeBSD$ -NATIVE_EMULATION= elf_x86_64_fbsd -HOST= ${TARGET_TUPLE} -CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\" -CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\" -_amd64_path= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\" -EMS+= ${NATIVE_EMULATION} -LDSCRIPTS+= ${NATIVE_EMULATION}.x ${NATIVE_EMULATION}.xbn ${NATIVE_EMULATION}.xn ${NATIVE_EMULATION}.xr \ - ${NATIVE_EMULATION}.xs ${NATIVE_EMULATION}.xu ${NATIVE_EMULATION}.xc ${NATIVE_EMULATION}.xsc \ - ${NATIVE_EMULATION}.xd ${NATIVE_EMULATION}.xdc -SRCS+= e${NATIVE_EMULATION}.c -CLEANFILES+= e${NATIVE_EMULATION}.c +NATIVE_EMULATION= elf_x86_64_fbsd -e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em scripttempl/elf.sc \ - genscripts.sh stringify.sed - sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_amd64_path} \ +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 ${LIBSERACHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ "${NATIVE_EMULATION}" "" no ${NATIVE_EMULATION} "${TARGET_TUPLE}" @@ -22,14 +14,14 @@ e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em scr X86_EMULATION= elf_i386_fbsd _i386_path= \"${TOOLS_PREFIX}/usr/lib/i386\" EMS+= ${X86_EMULATION} -LDSCRIPTS+= ${X86_EMULATION}.x ${X86_EMULATION}.xbn ${X86_EMULATION}.xn ${X86_EMULATION}.xr \ - ${X86_EMULATION}.xs ${X86_EMULATION}.xu ${X86_EMULATION}.xc ${X86_EMULATION}.xsc \ - ${X86_EMULATION}.xd ${X86_EMULATION}.xdc +.for ext in ${ELF_SCR_EXT} +LDSCRIPTS+= ${X86_EMULATION}.${ext} +.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 +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} \ diff --git a/gnu/usr.bin/binutils/ld/Makefile.i386 b/gnu/usr.bin/binutils/ld/Makefile.i386 index 51ea188..24a06d7 100644 --- a/gnu/usr.bin/binutils/ld/Makefile.i386 +++ b/gnu/usr.bin/binutils/ld/Makefile.i386 @@ -1,42 +1,12 @@ # $FreeBSD$ -.if ${TARGET_ARCH} == "i386" -NATIVE_EMULATION= elf_i386_fbsd -HOST= ${TARGET_TUPLE} -CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\" -CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\" -_i386_path= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\" -.else -_i386_path= \"/usr/cross/i386-freebsd/usr/lib\" -.endif -EMS+= ${NATIVE_EMULATION} -LDSCRIPTS+= ${NATIVE_EMULATION}.x ${NATIVE_EMULATION}.xbn ${NATIVE_EMULATION}.xn ${NATIVE_EMULATION}.xr \ - ${NATIVE_EMULATION}.xs ${NATIVE_EMULATION}.xu ${NATIVE_EMULATION}.xc ${NATIVE_EMULATION}.xsc \ - ${NATIVE_EMULATION}.xd ${NATIVE_EMULATION}.xdc -SRCS+= e${NATIVE_EMULATION}.c -CLEANFILES+= e${NATIVE_EMULATION}.c +NATIVE_EMULATION= elf_i386_fbsd -e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em scripttempl/elf.sc \ - genscripts.sh stringify.sed - sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_i386_path} \ +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 ${LIBSERACHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ "${NATIVE_EMULATION}" "" no ${NATIVE_EMULATION} "${TARGET_TUPLE}" - -.if defined(BINUTILSDISTDIR) && exists(${BINUTILSDISTDIR}) -EMS+= i386pe -LDSCRIPTS+= i386pe.x \ - i386pe.xbn \ - i386pe.xn \ - i386pe.xr \ - i386pe.xu -SRCS+= ei386pe.c -CLEANFILES+= ei386pe.c - -ei386pe.c: emulparams/i386pe.sh emultempl/pe.em scripttempl/pe.sc \ - genscripts.sh stringify.sed - sh ${.CURDIR}/genscripts.sh ${BINUTILSDISTDIR}/ld \ - /usr/cross/winnt/lib ${TOOLS_PREFIX}/usr/cross/winnt ${HOST} ${TARGET_TUPLE}-winnt \ - ${TARGET_TUPLE}-winnt i386pe "" no i386pe \ - ${TARGET_TUPLE}-winnt -.endif diff --git a/gnu/usr.bin/binutils/ld/Makefile.ia64 b/gnu/usr.bin/binutils/ld/Makefile.ia64 index 5a11991..44e3cb3 100644 --- a/gnu/usr.bin/binutils/ld/Makefile.ia64 +++ b/gnu/usr.bin/binutils/ld/Makefile.ia64 @@ -1,34 +1,23 @@ # $FreeBSD$ -.if ${TARGET_ARCH} == "ia64" -NATIVE_EMULATION= elf64_ia64_fbsd -HOST= ${TARGET_TUPLE} -CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\" -CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\" -_ia64_path= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\" -.else -_ia64_path= \"/usr/cross/ia64-freebsd/usr/lib\" -.endif +NATIVE_EMULATION= elf64_ia64_fbsd -EMS+= ${NATIVE_EMULATION} -LDSCRIPTS+= ${NATIVE_EMULATION}.x ${NATIVE_EMULATION}.xbn ${NATIVE_EMULATION}.xn ${NATIVE_EMULATION}.xr \ - ${NATIVE_EMULATION}.xs ${NATIVE_EMULATION}.xu ${NATIVE_EMULATION}.xc ${NATIVE_EMULATION}.xsc \ - ${NATIVE_EMULATION}.xd ${NATIVE_EMULATION}.xdc - -SRCS+= e${NATIVE_EMULATION}.c +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 ${_ia64_path} \ + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ "${NATIVE_EMULATION}" "" no ${NATIVE_EMULATION} "${TARGET_TUPLE}" +#XXX EMS+= eelf64_ia64 + SRCS+= eelf64_ia64.c CLEANFILES+= eelf64_ia64.c eelf64_ia64.c: emulparams/elf64_ia64.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed - sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_ia64_path} \ + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ "elf64_ia64" "" no elf64_ia64 ${TARGET_TUPLE} diff --git a/gnu/usr.bin/binutils/ld/Makefile.m68k b/gnu/usr.bin/binutils/ld/Makefile.m68k deleted file mode 100644 index 4b6e9c7..0000000 --- a/gnu/usr.bin/binutils/ld/Makefile.m68k +++ /dev/null @@ -1,52 +0,0 @@ -# $FreeBSD$ - -.if ${TARGET_ARCH} == "m68k" -HOST= m68k-unknown-freebsd -CFLAGS+= -DDEFAULT_EMULATION=\"elf_m68k\" -CFLAGS+= -DTARGET=\"m68k-unknown-freebsd\" -_m68k_path= \"${TOOLS_PREFIX}/usr/lib\" -.else -_m68k_path= \"/usr/cross/m68k-freebsd/usr/lib\" -.endif -EMS+= ld_m68kelf_emulation \ - ld_m68klynx_emulation \ - ld_m68knbsd_emulation -LDSCRIPTS+= m68kelf.x \ - m68kelf.xbn \ - m68kelf.xn \ - m68kelf.xr \ - m68kelf.xs \ - m68kelf.xu \ - m68klynx.x \ - m68klynx.xbn \ - m68klynx.xn \ - m68klynx.xr \ - m68klynx.xu \ - m68knbsd.x \ - m68knbsd.xbn \ - m68knbsd.xn \ - m68knbsd.xr \ - m68knbsd.xu -SRCS+= em68kelf.c \ - em68klynx.c \ - em68knbsd.c -CLEANFILES+= em68kelf.c \ - em68klynx.c \ - em68knbsd.c - -em68kelf.c: emulparams/m68kelf.sh emultempl/elf32.em scripttempl/elf.sc \ - genscripts.sh stringify.sed - sh ${.CURDIR}/genscripts.sh ${BINUTILSDISTDIR}/ld \ - ${_m68k_path} notused notused notused m68kelf "" m68kelf - -em68klynx.c: emulparams/m68klynx.sh emultempl/generic.em \ - scripttempl/m68klynx.sc genscripts.sh stringify.sed - sh ${.CURDIR}/genscripts.sh ${BINUTILSDISTDIR}/ld \ - /usr/cross/m68k-lynx/usr/lib notused notused notused \ - m68klynx "" m68klynx - -em68knbsd.c: emulparams/m68knbsd.sh emultempl/generic.em scripttempl/aout.sc \ - genscripts.sh stringify.sed - sh ${.CURDIR}/genscripts.sh ${BINUTILSDISTDIR}/ld \ - /usr/cross/m68k-netbsdaout/usr/lib notused notused notused \ - m68knbsd "" m68knbsd diff --git a/gnu/usr.bin/binutils/ld/Makefile.powerpc b/gnu/usr.bin/binutils/ld/Makefile.powerpc index 82f8380..4eaac08 100644 --- a/gnu/usr.bin/binutils/ld/Makefile.powerpc +++ b/gnu/usr.bin/binutils/ld/Makefile.powerpc @@ -1,30 +1,12 @@ # $FreeBSD$ -.if ${TARGET_ARCH} == "powerpc" NATIVE_EMULATION= elf32ppc -HOST= ${TARGET_TUPLE} -CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\" -CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\" -_powerpc_path= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\" -.else -_powerpc_path= \"/usr/cross/powerpc-freebsd/usr/lib\" -.endif -EMS+= ${NATIVE_EMULATION} -LDSCRIPTS+= ${NATIVE_EMULATION}.x \ - ${NATIVE_EMULATION}.xbn \ - ${NATIVE_EMULATION}.xn \ - ${NATIVE_EMULATION}.xr \ - ${NATIVE_EMULATION}.xs \ - ${NATIVE_EMULATION}.xu \ - ${NATIVE_EMULATION}.xsc \ - ${NATIVE_EMULATION}.xd \ - ${NATIVE_EMULATION}.xdc + 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 ${_powerpc_path} \ + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} diff --git a/gnu/usr.bin/binutils/ld/Makefile.sparc64 b/gnu/usr.bin/binutils/ld/Makefile.sparc64 index 53042bf..14126e3 100644 --- a/gnu/usr.bin/binutils/ld/Makefile.sparc64 +++ b/gnu/usr.bin/binutils/ld/Makefile.sparc64 @@ -1,42 +1,29 @@ # $FreeBSD$ -.if ${TARGET_ARCH} == "sparc64" -NATIVE_EMULATION= elf64_sparc_fbsd -HOST= ${TARGET_TUPLE} -CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\" -CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\" -_sparc_path= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\" -.else -_sparc_path= \"/usr/cross/sparc-freebsd/usr/lib\" -.endif +NATIVE_EMULATION= elf64_sparc_fbsd -EMS+= ${NATIVE_EMULATION} elf64_sparc -LDSCRIPTS+= ${NATIVE_EMULATION}.x ${NATIVE_EMULATION}.xbn ${NATIVE_EMULATION}.xn ${NATIVE_EMULATION}.xr \ - ${NATIVE_EMULATION}.xs ${NATIVE_EMULATION}.xu ${NATIVE_EMULATION}.xc ${NATIVE_EMULATION}.xsc \ - ${NATIVE_EMULATION}.xd ${NATIVE_EMULATION}.xdc 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 ${_sparc_path} \ + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} + .for BITS in 64 32 EMS+= elf${BITS}_sparc -LDSCRIPTS+= elf${BITS}_sparc.x elf${BITS}_sparc.xbn elf${BITS}_sparc.xn \ - elf${BITS}_sparc.xr \ - elf${BITS}_sparc.xs elf${BITS}_sparc.xu elf${BITS}_sparc.xc \ - elf${BITS}_sparc.xsc +.for ext in ${ELF_SCR_EXT} +LDSCRIPTS+= elf${BITS}_sparc.${ext} +.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 ${_sparc_path} \ + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ elf${BITS}_sparc "" no elf${BITS}_sparc ${TARGET_TUPLE} |