summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/binutils/Makefile.inc0
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/binutils/Makefile.inc0')
-rw-r--r--gnu/usr.bin/binutils/Makefile.inc029
1 files changed, 17 insertions, 12 deletions
diff --git a/gnu/usr.bin/binutils/Makefile.inc0 b/gnu/usr.bin/binutils/Makefile.inc0
index 5999a2e..cc20a56 100644
--- a/gnu/usr.bin/binutils/Makefile.inc0
+++ b/gnu/usr.bin/binutils/Makefile.inc0
@@ -6,13 +6,17 @@
VERSION= "2.15 [FreeBSD] 2004-05-23"
-TARGET_ARCH?= ${MACHINE_ARCH}
-.if ${TARGET_ARCH} == "amd64"
-BINUTILS_ARCH=x86_64
+.if defined(TARGET_ARCH)
+TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/}
.else
-BINUTILS_ARCH=${TARGET_ARCH}
+TARGET_CPUARCH=${MACHINE_CPUARCH}
.endif
+TARGET_ARCH?= ${MACHINE_ARCH}
+BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/}
TARGET_TUPLE?= ${BINUTILS_ARCH}-obrien-freebsd
+.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
@@ -22,28 +26,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}} == "")
OpenPOWER on IntegriCloud