summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/binutils/Makefile.inc0
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2007-02-11 07:15:06 +0000
committermarcel <marcel@FreeBSD.org>2007-02-11 07:15:06 +0000
commit3c925b07d6111dac4b4ad4a92620b3bf456aa1c9 (patch)
tree2fc6f63b6545a64292f5928d77e87ab02cb2eb42 /gnu/usr.bin/binutils/Makefile.inc0
parent909177e227a00404bc8c412d1a3cb60f2b4b4262 (diff)
downloadFreeBSD-src-3c925b07d6111dac4b4ad4a92620b3bf456aa1c9.zip
FreeBSD-src-3c925b07d6111dac4b4ad4a92620b3bf456aa1c9.tar.gz
Fix PowerPC-targeted cross-builds performed on 64-bit platforms.
Only PowerPC supports both 32-bit and 64-bit targets and the BFD_DEFAULT_TARGET_SIZE is used by the binutils code to reflect the preferred ABI. We define BFD_DEFAULT_TARGET_SIZE for all platforms, but based on the build machine. As such 64-bit build machines defined BFD_DEFAULT_TARGET_SIZE incorrectly for 32-bit targets, but since this only affects PowerPC it went unnoticed for a long time. The fix is to define BFD_DEFAULT_TARGET_SIZE based on the target architecture. PR: amd64/102996 MFC after: 1 month
Diffstat (limited to 'gnu/usr.bin/binutils/Makefile.inc0')
-rw-r--r--gnu/usr.bin/binutils/Makefile.inc06
1 files changed, 6 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils/Makefile.inc0 b/gnu/usr.bin/binutils/Makefile.inc0
index bda5ebf..859a3a8 100644
--- a/gnu/usr.bin/binutils/Makefile.inc0
+++ b/gnu/usr.bin/binutils/Makefile.inc0
@@ -22,6 +22,12 @@ RELTOP:= ..
RELSRC= ${RELTOP}/../../../contrib/binutils
SRCDIR= ${.CURDIR}/${RELSRC}
+.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "powerpc"
+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}
OpenPOWER on IntegriCloud