Index: Makefile.inc1 =================================================================== --- Makefile.inc1 +++ Makefile.inc1 @@ -363,7 +363,7 @@ RANLIB=${XRANLIB} STRINGS=${XSTRINGS} \ SIZE="${XSIZE}" -.if ${XCC:M/*} +.if ${XCC:M/*} && !${XCC:M*ccache*} .if defined(CROSS_BINUTILS_PREFIX) # In the case of xdev-build tools, CROSS_BINUTILS_PREFIX won't be a # directory, but the compiler will look in the right place for it's @@ -437,7 +437,7 @@ -isystem ${LIB32TMP}/usr/include/ \ -L${LIB32TMP}/usr/lib32 \ -B${LIB32TMP}/usr/lib32 -.if ${XCC:M/*} +.if ${XCC:M/*} && !${XCC:M*ccache*} LIB32FLAGS+= --sysroot=${WORLDTMP} .endif @@ -1512,7 +1512,7 @@ # If an full path to an external cross compiler is given, don't build # a cross compiler. -.if ${XCC:M/*} == "" && ${MK_CROSS_COMPILER} != "no" +.if (${XCC:M/*} == "" || ${XCC:M*ccache*}) && ${MK_CROSS_COMPILER} != "no" .if ${MK_CLANG_BOOTSTRAP} != "no" _clang= usr.bin/clang _clang_libs= lib/clang