From e557699b996b906202ecdf2fa2e29f62a3cfd88a Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Thu, 10 Jan 2019 12:26:51 +0000 Subject: 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). --- reproduce/src/make/dependencies-basic.mk | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'reproduce/src/make/dependencies-basic.mk') 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) -- cgit v1.2.1