summaryrefslogtreecommitdiffstats
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2016-06-03 20:49:49 +0000
committerbdrewery <bdrewery@FreeBSD.org>2016-06-03 20:49:49 +0000
commit84d74a755b2208cb16f7d7ac3031e6852b6eecdc (patch)
tree2e21a4a56a3b9b4dc26e4ea911bc190d45ae352f /Makefile.inc1
parent0eeb947db65e4e39eeb730f977002b6641cbfff8 (diff)
downloadFreeBSD-src-84d74a755b2208cb16f7d7ac3031e6852b6eecdc.zip
FreeBSD-src-84d74a755b2208cb16f7d7ac3031e6852b6eecdc.tar.gz
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
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc112
1 files changed, 9 insertions, 3 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 39147a2..448c768 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -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_VERSION} \
.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}
OpenPOWER on IntegriCloud