summaryrefslogtreecommitdiff
path: root/Ports
diff options
context:
space:
mode:
Diffstat (limited to 'Ports')
-rwxr-xr-xPorts/.port_include.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh
index 3b86adafd2..9a1c1bd8a8 100755
--- a/Ports/.port_include.sh
+++ b/Ports/.port_include.sh
@@ -23,8 +23,12 @@ maybe_source() {
enable_ccache() {
if command -v ccache &>/dev/null; then
- export CC="ccache ${CC}"
- export CXX="ccache ${CXX}"
+ ccache_tooldir="${SERENITY_BUILD_DIR}/ccache"
+ mkdir -p "$ccache_tooldir"
+ for tool in gcc g++ c++; do
+ ln -sf "$(command -v ccache)" "${ccache_tooldir}/${SERENITY_ARCH}-pc-serenity-${tool}"
+ done
+ export PATH="${ccache_tooldir}:$PATH"
fi
}