Author: bdrewery
Date: Fri Mar 25 22:36:13 2016
New Revision: 297277
URL: https://svnweb.freebsd.org/changeset/base/297277

Log:
  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

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1  Fri Mar 25 22:32:26 2016        (r297276)
+++ head/Makefile.inc1  Fri Mar 25 22:36:13 2016        (r297277)
@@ -413,7 +413,8 @@ CROSSENV+=  CC="${XCC} ${XCFLAGS}" CXX="$
                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")
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to