From 8b5c211c221c57f7fe07a811960a93253e934486 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Mon, 11 Jun 2018 18:17:31 +0100 Subject: [PATCH] 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. --- configure | 1 + gem5/build | 1 + 2 files changed, 2 insertions(+) diff --git a/configure b/configure index 6f5d9a0..5b0fe4d 100755 --- a/configure +++ b/configure @@ -40,6 +40,7 @@ wget \ " if "$gem5"; then pkgs="$pkgs \ +ccache \ gcc-aarch64-linux-gnu \ gcc-arm-linux-gnueabi \ libgoogle-perftools-dev \ diff --git a/gem5/build b/gem5/build index 6b5fa78..029cebd 100755 --- a/gem5/build +++ b/gem5/build @@ -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"