diff options
author | dim <dim@FreeBSD.org> | 2010-11-11 20:52:24 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2010-11-11 20:52:24 +0000 |
commit | 37e50857240f22fdc2beb83a5bf670c44a94212d (patch) | |
tree | 9a6496b320a182a536b4a33b916ab30b48840f06 /gnu/usr.bin/binutils/Makefile.inc0 | |
parent | cfbe0682af24afabd3a5a9652758cf3ef046843b (diff) | |
parent | 56b80da7cac820e4575a4eca93a1c13c386ccec5 (diff) | |
download | FreeBSD-src-37e50857240f22fdc2beb83a5bf670c44a94212d.zip FreeBSD-src-37e50857240f22fdc2beb83a5bf670c44a94212d.tar.gz |
Sync: merge r214895 through r215140 from ^/head.
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}} == "") |