From b7df39cc12e77c05f54a0257f4b355ea808f5408 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Tue, 8 Dec 2015 20:20:40 +0000 Subject: [PATCH] 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 --- share/mk/bsd.compiler.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk index e5d349adf738..d7763e4e06b4 100644 --- a/share/mk/bsd.compiler.mk +++ b/share/mk/bsd.compiler.mk @@ -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}} == ""