summaryrefslogtreecommitdiffstats
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2015-02-18 19:27:51 +0000
committergrehan <grehan@FreeBSD.org>2015-02-18 19:27:51 +0000
commite88977434bd97898228c4330df94ca93ffd4b3bf (patch)
treea3b2178d08724df72621d92da5253a97e9f932c7 /Makefile.inc1
parent45116d3e78cfcd8df0ab708b7eb169baae1d9802 (diff)
downloadFreeBSD-src-e88977434bd97898228c4330df94ca93ffd4b3bf.zip
FreeBSD-src-e88977434bd97898228c4330df94ca93ffd4b3bf.tar.gz
Restore the ability to use clang as an external compiler. This was
inadvertently removed when support for external GCC was added. Deprecate XFLAGS in favour of the newer XCFLAGS/XCXXFLAGS. Tested with: make universe, make CROSS_COMPILER_PREFIX=/usr/bin/ buildworld Reviewed by: imp, bapt
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc17
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index e3b68dd..f4795d4 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -343,16 +343,15 @@ WMAKEENV+= CC="${XCC} ${XCFLAGS}" CXX="${XCXX} ${XCFLAGS} ${XCXXFLAGS}" \
SIZE="${XSIZE}"
.if ${XCC:M/*}
-XFLAGS= --sysroot=${WORLDTMP}
.if defined(CROSS_BINUTILS_PREFIX)
# In the case of xdev-build tools, CROSS_BINUTILS_PREFIX won't be a
# directory, but the compiler will look in the right place for it's
# tools so we don't need to tell it where to look.
.if exists(${CROSS_BINUTILS_PREFIX})
-XFLAGS+= -B${CROSS_BINUTILS_PREFIX}
+BFLAGS+= -B${CROSS_BINUTILS_PREFIX}
.endif
.else
-XFLAGS+= -B${WORLDTMP}/usr/bin
+BFLAGS+= -B${WORLDTMP}/usr/bin
.endif
.if ${TARGET} == "arm"
.if ${TARGET_ARCH:M*hf*} != ""
@@ -369,6 +368,8 @@ DEPFLAGS+= -I${WORLDTMP}/usr/include/c++/v1
TARGET_ABI?= unknown
TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0
XCFLAGS+= -target ${TARGET_TRIPLE}
+XCFLAGS+= --sysroot=${WORLDTMP} ${BFLAGS}
+XCXXFLAGS+= --sysroot=${WORLDTMP} ${BFLAGS}
.endif
.endif
OpenPOWER on IntegriCloud