1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

CCACHE_BUILD: Only export CCACHE_PATH= if it was already set with a value.

Older ccache don't work with an empty CCACHE_PATH value.  They will error with:
  ccache: FATAL: Could not find compiler "cc" in PATH
  make: "/mnt/bdrewery/git/onefs/src/share/mk/bsd.compiler.mk" line 134: Unable to determine compiler type for /usr/local/bin/ccache cc.  Consider setting COMPILER_TYPE.

Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery 2015-12-08 20:20:40 +00:00
parent 17d6a39aa7
commit b7df39cc12
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=292002

View File

@ -64,8 +64,10 @@ CCACHE_COMPILERCHECK?= mtime
# Remove ccache from the PATH to prevent double calls and wasted CPP/LD time.
PATH:= ${PATH:C,:?${CCACHE_WRAPPER_PATH}(/world)?(:$)?,,g}
# Ensure no bogus CCACHE_PATH leaks in which might avoid the in-tree compiler.
.if !empty(CCACHE_PATH)
CCACHE_PATH=
.export CCACHE_PATH
.endif
# Override various toolchain vars.
.for var in CC CXX HOST_CC HOST_CXX
.if defined(${var}) && ${${var}:M${CCACHE_BIN}} == ""