From d3eaca62ea7e4bd586e9c07d12691d207dbe0a55 Mon Sep 17 00:00:00 2001 From: Tk-Glitch Date: Thu, 2 Apr 2020 13:42:29 +0200 Subject: [PATCH] Workaround ccache not being used by the makepkg wrapper. It seems directly injecting to CC doesn't work either, but this PATH workaround does. --- linux54-tkg/PKGBUILD | 14 +++++++------- linux55-tkg/PKGBUILD | 14 +++++++------- linux56-tkg/PKGBUILD | 14 +++++++------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/linux54-tkg/PKGBUILD b/linux54-tkg/PKGBUILD index 5f142f7..5f9ddac 100644 --- a/linux54-tkg/PKGBUILD +++ b/linux54-tkg/PKGBUILD @@ -96,13 +96,7 @@ url="http://www.kernel.org/" license=('GPL2') makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'libelf' 'patchutils' 'flex' 'python-sphinx' 'python-sphinx_rtd_theme' 'graphviz' 'imagemagick' 'git') optdepends=('schedtool') -if pacman -Qq ccache &> /dev/null; then - msg2 'ccache was found and will be used' - options=('!strip' 'ccache') -else - msg2 'ccache was not found and will not be used' - options=('!strip') -fi +options=('!strip') source=("https://www.kernel.org/pub/linux/kernel/v5.x/linux-${_basekernel}.tar.xz" "https://www.kernel.org/pub/linux/kernel/v5.x/patch-${pkgver}.xz" 'config.x86_64' # stock Arch config @@ -849,6 +843,12 @@ build() { _force_all_threads=${MAKEFLAGS} fi + # ccache + if pacman -Qq ccache &> /dev/null; then + export PATH="/usr/lib/ccache/bin/:$PATH" + msg2 'ccache was found and will be used' + fi + # build! _runtime=$( time ( schedtool -B -n 1 -e ionice -n 1 make $_force_all_threads LOCALVERSION= bzImage modules 2>&1 ) 3>&1 1>&2 2>&3 ) || _runtime=$( time ( make $_force_all_threads LOCALVERSION= bzImage modules 2>&1 ) 3>&1 1>&2 2>&3 ) } diff --git a/linux55-tkg/PKGBUILD b/linux55-tkg/PKGBUILD index be93c5c..90faeec 100644 --- a/linux55-tkg/PKGBUILD +++ b/linux55-tkg/PKGBUILD @@ -96,13 +96,7 @@ url="http://www.kernel.org/" license=('GPL2') makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'libelf' 'patchutils' 'flex' 'python-sphinx' 'python-sphinx_rtd_theme' 'graphviz' 'imagemagick' 'git') optdepends=('schedtool') -if pacman -Qq ccache &> /dev/null; then - msg2 'ccache was found and will be used' - options=('!strip' 'ccache') -else - msg2 'ccache was not found and will not be used' - options=('!strip') -fi +options=('!strip') source=("https://www.kernel.org/pub/linux/kernel/v5.x/linux-${_basekernel}.tar.xz" "https://www.kernel.org/pub/linux/kernel/v5.x/patch-${pkgver}.xz" 'config.x86_64' # stock Arch config @@ -901,6 +895,12 @@ build() { _force_all_threads="${MAKEFLAGS}" fi + # ccache + if pacman -Qq ccache &> /dev/null; then + export PATH="/usr/lib/ccache/bin/:$PATH" + msg2 'ccache was found and will be used' + fi + # build! _runtime=$( time ( schedtool -B -n 1 -e ionice -n 1 make ${_force_all_threads} LOCALVERSION= bzImage modules 2>&1 ) 3>&1 1>&2 2>&3 ) || _runtime=$( time ( make ${_force_all_threads} LOCALVERSION= bzImage modules 2>&1 ) 3>&1 1>&2 2>&3 ) } diff --git a/linux56-tkg/PKGBUILD b/linux56-tkg/PKGBUILD index a27dcc4..a081064 100644 --- a/linux56-tkg/PKGBUILD +++ b/linux56-tkg/PKGBUILD @@ -96,13 +96,7 @@ url="http://www.kernel.org/" license=('GPL2') makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'libelf' 'patchutils' 'flex' 'python-sphinx' 'python-sphinx_rtd_theme' 'graphviz' 'imagemagick' 'git') optdepends=('schedtool') -if pacman -Qq ccache &> /dev/null; then - msg2 'ccache was found and will be used' - options=('!strip' 'ccache') -else - msg2 'ccache was not found and will not be used' - options=('!strip') -fi +options=('!strip') source=("https://www.kernel.org/pub/linux/kernel/v5.x/linux-${_basekernel}.tar.xz" "https://www.kernel.org/pub/linux/kernel/v5.x/patch-${pkgver}.xz" 'config.x86_64' # stock Arch config @@ -907,6 +901,12 @@ build() { _force_all_threads="${MAKEFLAGS}" fi + # ccache + if pacman -Qq ccache &> /dev/null; then + export PATH="/usr/lib/ccache/bin/:$PATH" + msg2 'ccache was found and will be used' + fi + # build! _runtime=$( time ( schedtool -B -n 1 -e ionice -n 1 make ${_force_all_threads} LOCALVERSION= bzImage modules 2>&1 ) 3>&1 1>&2 2>&3 ) || _runtime=$( time ( make ${_force_all_threads} LOCALVERSION= bzImage modules 2>&1 ) 3>&1 1>&2 2>&3 ) }