diff --git a/config/functions b/config/functions index cc287404eb..a03dbb490b 100644 --- a/config/functions +++ b/config/functions @@ -495,6 +495,11 @@ setup_toolchain() { if [ "$1" = "host" ] && flag_enabled "local-cc" "no"; then export CC="${LOCAL_CC}" export CXX="${LOCAL_CXX}" + if [ -n "${LOCAL_CCACHE}" ]; then + export CCACHE_DIR="${LOCAL_CCACHE_DIR}" + export CC="${LOCAL_CCACHE} ${CC}"; + export CXX="${LOCAL_CCACHE} ${CXX}"; + fi else export CC="$TOOLCHAIN/bin/host-gcc" export CXX="$TOOLCHAIN/bin/host-g++"