ecc4dcbd82
The target machine is represented by TARGET_ARCH. MACHINE_ARCH always represents the host machine. When TARGET_ARCH is not defined, it is assumed to be equal to MACHINE_ARCH. This means that we're building a native toolset by default. We're creating cross-compilation tools when MACHINE_ARCH != TARGET_ARCH. TARGET_ARCH is defined when building binutils as part of the bootstrap build and is set to reflect the architecture we're currently cross- building. With this change binutils is ready for cross-building.
25 lines
748 B
Makefile
25 lines
748 B
Makefile
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
.if ${TARGET_ARCH} == "sparc"
|
|
HOST= sparc-unknown-freebsd
|
|
CFLAGS+= -DDEFAULT_EMULATION=\"elf32_sparc\"
|
|
CFLAGS+= -DTARGET=\"sparc-unknown-freebsd\"
|
|
_sparc_path= \"/usr/lib\"
|
|
.else
|
|
_sparc_path= \"/usr/cross/sparc-freebsd/usr/lib\"
|
|
.endif
|
|
EMS+= ld_elf32_sparc_emulation
|
|
LDSCRIPTS+= elf32_sparc.x elf32_sparc.xbn elf32_sparc.xn elf32_sparc.xr \
|
|
elf32_sparc.xs elf32_sparc.xu
|
|
SRCS+= eelf32_sparc.c
|
|
CLEANFILES+= eelf32_sparc.c
|
|
|
|
eelf32_sparc.c: emulparams/elf32_sparc.sh emultempl/elf32.em \
|
|
scripttempl/elf.sc genscripts.sh emultempl/stringify.sed
|
|
sh ${.CURDIR}/genscripts.sh ${BINUTILSDISTDIR}/ld ${_sparc_path} \
|
|
${HOST} sparc-unknown-freebsd sparc-unknown-freebsd \
|
|
elf32_sparc "" elf32_sparc sparc-unknown-freebsd
|
|
|