diff options
Diffstat (limited to 'gnu/usr.bin/binutils/Makefile.inc0')
-rw-r--r-- | gnu/usr.bin/binutils/Makefile.inc0 | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/gnu/usr.bin/binutils/Makefile.inc0 b/gnu/usr.bin/binutils/Makefile.inc0 index 7a062ba..09bda29 100644 --- a/gnu/usr.bin/binutils/Makefile.inc0 +++ b/gnu/usr.bin/binutils/Makefile.inc0 @@ -6,15 +6,19 @@ VERSION= "2.17.50 [FreeBSD] 2007-07-03" +.if defined(TARGET_ARCH) +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} +.else +TARGET_CPUARCH=${MACHINE_CPUARCH} +.endif TARGET_ARCH?= ${MACHINE_ARCH} TARGET_VENDOR?= unknown TARGET_OS?= freebsd -.if ${TARGET_ARCH} == "amd64" -BINUTILS_ARCH=x86_64 -.else -BINUTILS_ARCH=${TARGET_ARCH} -.endif +BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/} TARGET_TUPLE?= ${BINUTILS_ARCH}-${TARGET_VENDOR}-${TARGET_OS} +.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "mipseb" +TARGET_BIG_ENDIAN=t +.endif # RELTOP is the relative path to this point in the source or object # tree, from any subdirectory of same. It gets extra "../" prefixes @@ -24,28 +28,29 @@ RELTOP:= .. RELSRC= ${RELTOP}/../../../contrib/binutils SRCDIR= ${.CURDIR}/${RELSRC} -.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "i386" || \ - ${TARGET_ARCH} == "powerpc" || \ - (${TARGET_ARCH} == "mips" && (!defined(TARGET_ABI) || ${TARGET_ABI} != "n64")) +.if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \ + ${TARGET_CPUARCH} == "powerpc" || \ + (${TARGET_CPUARCH} == "mips" && \ + (!defined(TARGET_ABI) || ${TARGET_ABI} != "n64")) CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32 .else CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 .endif CFLAGS+= -I. -.if exists(${.CURDIR}/${TARGET_ARCH}) -CFLAGS+= -I${.CURDIR}/${TARGET_ARCH} +.if exists(${.CURDIR}/${TARGET_CPUARCH}) +CFLAGS+= -I${.CURDIR}/${TARGET_CPUARCH} .endif CFLAGS+= -I${.CURDIR} CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd CFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd CFLAGS+= -I${SRCDIR}/include -.if exists(${.CURDIR}/${TARGET_ARCH}) -.PATH: ${.CURDIR}/${TARGET_ARCH} +.if exists(${.CURDIR}/${TARGET_CPUARCH}) +.PATH: ${.CURDIR}/${TARGET_CPUARCH} .endif -ARCHS= ${TARGET_ARCH} +ARCHS= ${TARGET_CPUARCH} .for _arch in ${CROSS_ARCH} .if (${ARCHS:R:M${_arch:R}} == "") |