From 6445648f9cadda635173f9e02e53bb4b56473f46 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Thu, 26 Sep 2019 08:57:10 -0700 Subject: [PATCH 1/2] jenkins: use ccache with devtoolset on ppc64le Because devtoolset setup works by putting the devtoolset bin/ on the front of PATH the compiler is called directly instead of via the ccache wrappers. Change select-compiler.sh to explicitly use ccache, as it does for s390x. --- jenkins/scripts/select-compiler.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jenkins/scripts/select-compiler.sh b/jenkins/scripts/select-compiler.sh index a65b90a45..be5fa9374 100644 --- a/jenkins/scripts/select-compiler.sh +++ b/jenkins/scripts/select-compiler.sh @@ -27,6 +27,9 @@ if [ "$SELECT_ARCH" = "PPC64LE" ]; then if [ "$NODEJS_MAJOR_VERSION" -gt "9" ]; then # Setup devtoolset-6, sets LD_LIBRARY_PATH, PATH, etc. . /opt/rh/devtoolset-6/enable + export CC="ccache ppc64le-redhat-linux-gcc" + export CXX="ccache ppc64le-redhat-linux-g++" + export LINK="ppc64le-redhat-linux-g++" echo "Compiler set to devtoolset-6" return fi From 4677e440da5b18450b5f336ae1c3a628dfc1453f Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Thu, 26 Sep 2019 09:48:49 -0700 Subject: [PATCH 2/2] jenkins: use ccache with gcc/g++ on ppc64le ccache doesn't have wrappers for gcc-6,g++-4, etc., so call ccache explicitly. --- jenkins/scripts/select-compiler.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins/scripts/select-compiler.sh b/jenkins/scripts/select-compiler.sh index be5fa9374..fbe5e8f2f 100644 --- a/jenkins/scripts/select-compiler.sh +++ b/jenkins/scripts/select-compiler.sh @@ -46,8 +46,8 @@ if [ "$SELECT_ARCH" = "PPC64LE" ]; then fi # Select the appropriate compiler - export CC="gcc-${COMPILER_LEVEL}" - export CXX="g++-${COMPILER_LEVEL}" + export CC="ccache gcc-${COMPILER_LEVEL}" + export CXX="ccache g++-${COMPILER_LEVEL}" export LINK="g++-${COMPILER_LEVEL}" echo "Compiler set to $COMPILER_LEVEL"