aboutsummaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2016-03-25 22:36:13 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2016-03-25 22:36:13 +0000
commitd63cb012ba3714f63d35c9df1450f6e198d03a0a (patch)
treeb799bd99fc8f2cb51b505e1498d26bdb1e9da24a /Makefile.inc1
parent20afc491bb3a1cfb76173318a1ca9be4e73df1a5 (diff)
downloadsrc-d63cb012ba3714f63d35c9df1450f6e198d03a0a.tar.gz
src-d63cb012ba3714f63d35c9df1450f6e198d03a0a.zip
WITHOUT_CROSS_COMPILER: Fix this to use external compiler logic.
Without this the default toolchain in /usr/bin/ would not use WORLDTMP via --sysroot, and would lack --target if cross-building. PR: 196193 Related: D3970 Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=297277
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc15
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index fddb06e27460..2e39d6cc3a66 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -413,7 +413,8 @@ CROSSENV+= CC="${XCC} ${XCFLAGS}" CXX="${XCXX} ${XCFLAGS} ${XCXXFLAGS}" \
RANLIB=${XRANLIB} STRINGS=${XSTRINGS} \
SIZE="${XSIZE}"
-.if ${XCC:N${CCACHE_BIN}:M/*}
+# External compiler needs sysroot and target flags.
+.if ${XCC:N${CCACHE_BIN}:M/*} || ${MK_CROSS_COMPILER} == "no"
.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
@@ -454,7 +455,7 @@ BFLAGS+= -B${CROSS_BINUTILS_PREFIX}
XCFLAGS+= ${BFLAGS}
XCXXFLAGS+= ${BFLAGS}
.endif
-.endif # ${XCC:M/*}
+.endif # ${XCC:M/*} || ${MK_CROSS_COMPILER} == "no"
.if ${MK_LIB32} != "no" && (${TARGET_ARCH} == "amd64" || \
${TARGET_ARCH} == "powerpc64")