summaryrefslogtreecommitdiffstats
path: root/toolchain/toolchain-wrapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain/toolchain-wrapper.c')
-rw-r--r--toolchain/toolchain-wrapper.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/toolchain/toolchain-wrapper.c b/toolchain/toolchain-wrapper.c
index d52115f51a..11f93f0fd5 100644
--- a/toolchain/toolchain-wrapper.c
+++ b/toolchain/toolchain-wrapper.c
@@ -268,6 +268,10 @@ int main(int argc, char **argv)
fprintf(stderr, "%sCCACHE_COMPILERCHECK='string:" BR_CCACHE_HASH "'",
(debug == 2) ? "\n " : " ");
#endif
+#ifdef BR_CCACHE_BASEDIR
+ fprintf(stderr, "%sCCACHE_BASEDIR='" BR_CCACHE_BASEDIR "'",
+ (debug == 2) ? "\n " : " ");
+#endif
for (i = 0; exec_args[i]; i++)
fprintf(stderr, "%s'%s'",
(debug == 2) ? "\n " : " ", exec_args[i]);
@@ -282,6 +286,13 @@ int main(int argc, char **argv)
return 3;
}
#endif
+#ifdef BR_CCACHE_BASEDIR
+ /* Allow compilercheck to be overridden through the environment */
+ if (setenv("CCACHE_BASEDIR", BR_CCACHE_BASEDIR, 0)) {
+ perror(__FILE__ ": Failed to set CCACHE_BASEDIR");
+ return 3;
+ }
+#endif
if (execv(exec_args[0], exec_args))
perror(path);
OpenPOWER on IntegriCloud