aboutsummaryrefslogtreecommitdiff
path: root/reproduce/src/make/dependencies-basic.mk
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2019-01-10 12:26:51 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2019-01-10 12:26:51 +0000
commite557699b996b906202ecdf2fa2e29f62a3cfd88a (patch)
tree590512e192cc1688baf4fb0edac326cb5e4b3d6b /reproduce/src/make/dependencies-basic.mk
parent6dd16b871a04fe29d1805b110371b0a229876159 (diff)
ccache ignored and disabled
ccache is a super annoying program in the context of the reproduction pipeline. On systems that use it, the `gcc' and `g++' that are found in PATH are actually calls to `ccache' (so it can manage their call)! Two steps have been taken to ignore and disable ccache (if it isn't ignored properly!): 1) when making symbolic links to compilers, if a directory containing `ccache' is present in the PATH, it is first removed, then we look for the low-level programs that we won't be building. 2) The `CCACHE_DISABLE' environment variable is set to 1 where necessary (with the other environment variables).
Diffstat (limited to 'reproduce/src/make/dependencies-basic.mk')
-rw-r--r--reproduce/src/make/dependencies-basic.mk15
1 files changed, 13 insertions, 2 deletions
diff --git a/reproduce/src/make/dependencies-basic.mk b/reproduce/src/make/dependencies-basic.mk
index 8625cf6..9ae52a0 100644
--- a/reproduce/src/make/dependencies-basic.mk
+++ b/reproduce/src/make/dependencies-basic.mk
@@ -56,6 +56,7 @@ syspath := $(PATH)
# As we build more programs, we want to use our own pipeline's built
# programs and libraries, not the host's.
+export CCACHE_DISABLE := 1
export PATH := $(ibdir):$(PATH)
export PKG_CONFIG_PATH := $(ildir)/pkgconfig
export PKG_CONFIG_LIBDIR := $(ildir)/pkgconfig
@@ -187,8 +188,18 @@ $(tarballs): $(tdir)/%:
# For the time being, we aren't building a local C compiler, but we'll use
# any C compiler that the system already has and just make a symbolic link
# to it.
-makelink = export PATH=$(syspath); a=$$(which $(1) 2> /dev/null); \
- if [ -f $(ibdir)/$(1) ]; then rm $(ibdir)/$(1); fi; \
+#
+# ccache: ccache acts like a wrapper over the C compiler and is made to
+# avoid/speed-up compiling of identical files in a system (it is commonly
+# used on large servers). It actually makes `gcc' or `g++' a symbolic link
+# to itself so it can control them internally. So, for our purpose here, it
+# is very annoying and can cause many complications. We thus remove any
+# part of PATH of that has `ccache' in it before making symbolic links to
+# the programs we are not building ourselves.
+makelink = export PATH=$$(echo $(syspath)| tr : '\n' |grep -v ccache \
+ | paste -s -d:); \
+ a=$$(which $(1) 2> /dev/null); \
+ if [ -f $(ibdir)/$(1) ]; then rm $(ibdir)/$(1); fi; \
if [ x$$a != x ]; then ln -s $$a $(ibdir)/$(1); fi
$(ibdir) $(ildir):; mkdir $@
$(ibdir)/low-level-links: | $(ibdir) $(ildir)