Author: bdrewery
Date: Fri Jun  3 20:49:49 2016
New Revision: 301287
URL: https://svnweb.freebsd.org/changeset/base/301287

Log:
  WITHOUT_CROSS_COMPILER: Fix installworld.
  
  Since no WORLDTMP/usr/bin/cc is created, cc cannot be found
  during installworld time since /usr/bin is not in the PATH.
  Pass along the known compiler metadata to allow installworld
  to work.  The same fix was used for WITH_SYSTEM_COMPILER.
  
  A better route would be to store a cookie in buildworld
  containing this compiler metadata and then using that
  at install time, rather than rerunning cc.
  
  Reported by:  Mark Millard
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1  Fri Jun  3 19:25:45 2016        (r301286)
+++ head/Makefile.inc1  Fri Jun  3 20:49:49 2016        (r301287)
@@ -118,9 +118,6 @@ CROSS_COMPILER_VERSION!= \
 # Everything matches, disable the bootstrap compiler.
 MK_CLANG_BOOTSTRAP=    no
 MK_GCC_BOOTSTRAP=      no
-CROSSENV+=     COMPILER_VERSION=${COMPILER_VERSION} \
-               COMPILER_TYPE=${COMPILER_TYPE} \
-               COMPILER_FREEBSD_VERSION=${COMPILER_FREEBSD_VERSION}
 .if make(buildworld)
 .info SYSTEM_COMPILER: Determined that CC=${CC} matches the source tree.  Not 
bootstrapping a cross-compiler.
 .endif
@@ -128,6 +125,15 @@ CROSSENV+= COMPILER_VERSION=${COMPILER_V
 .endif # ${_expected_compiler_type} == ${COMPILER_TYPE}
 .endif # ${XCC:N${CCACHE_BIN}:M/*}
 
+# For installworld need to ensure that the looked-up compiler metadata is
+# passed along rather than trying to run cc from the restricted
+# STRICTTMPPATH.
+.if ${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no"
+CROSSENV+=     COMPILER_VERSION=${COMPILER_VERSION} \
+               COMPILER_TYPE=${COMPILER_TYPE} \
+               COMPILER_FREEBSD_VERSION=${COMPILER_FREEBSD_VERSION}
+.endif
+
 # Handle external binutils.
 .if defined(CROSS_TOOLCHAIN_PREFIX)
 CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX}
_______________________________________________
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