gem5: build with ccache

CXX='ccache c++' does not work, CXX=/my/path/to/ccache/wrapper/c++
does not work, the only thing that works it to put it in your PATH.

I would rather put a wrapper that forwards to ccache in this repo to
avoid the external host dependency:

    #!/usr/bin/env bash
    ccache c++ "$@"

but then that script has to remove its directory from PATH or else
infinite recursion, and I have no patience to code that.

I considered using the ccache from Buildroot, but it does not setup the
nice /usr/lib PATH, so I gave up on that as well.
This commit is contained in:
Ciro Santilli
2018-06-11 18:17:31 +01:00
parent 007e4114a6
commit 8b5c211c22
2 changed files with 2 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ system_dir="${outdir}/system"
binaries_dir="${system_dir}/binaries"
disks_dir="${system_dir}/disks"
mkdir -p "$binaries_dir" "$disks_dir"
export PATH="/usr/lib/ccache:${PATH}"
if [ "$arch" = x86_64 ]; then
scons -j "$j" --ignore-style "${outdir}/build/X86/gem5.opt"
f="${disks_dir}/linux-bigswap2.img"