1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

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
This commit is contained in:
Bryan Drewery 2016-06-03 20:49:49 +00:00
parent 6c24213e61
commit bbfcc681bc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=301287

View File

@ -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}