Workaround ccache not being used by the makepkg wrapper. It seems directly injecting to CC doesn't work either, but this PATH workaround does.
This commit is contained in:
parent
e4541e99aa
commit
d3eaca62ea
@ -96,13 +96,7 @@ url="http://www.kernel.org/"
|
|||||||
license=('GPL2')
|
license=('GPL2')
|
||||||
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'libelf' 'patchutils' 'flex' 'python-sphinx' 'python-sphinx_rtd_theme' 'graphviz' 'imagemagick' 'git')
|
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'libelf' 'patchutils' 'flex' 'python-sphinx' 'python-sphinx_rtd_theme' 'graphviz' 'imagemagick' 'git')
|
||||||
optdepends=('schedtool')
|
optdepends=('schedtool')
|
||||||
if pacman -Qq ccache &> /dev/null; then
|
options=('!strip')
|
||||||
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
|
|
||||||
source=("https://www.kernel.org/pub/linux/kernel/v5.x/linux-${_basekernel}.tar.xz"
|
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"
|
"https://www.kernel.org/pub/linux/kernel/v5.x/patch-${pkgver}.xz"
|
||||||
'config.x86_64' # stock Arch config
|
'config.x86_64' # stock Arch config
|
||||||
@ -849,6 +843,12 @@ build() {
|
|||||||
_force_all_threads=${MAKEFLAGS}
|
_force_all_threads=${MAKEFLAGS}
|
||||||
fi
|
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!
|
# 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 )
|
_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 )
|
||||||
}
|
}
|
||||||
|
@ -96,13 +96,7 @@ url="http://www.kernel.org/"
|
|||||||
license=('GPL2')
|
license=('GPL2')
|
||||||
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'libelf' 'patchutils' 'flex' 'python-sphinx' 'python-sphinx_rtd_theme' 'graphviz' 'imagemagick' 'git')
|
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'libelf' 'patchutils' 'flex' 'python-sphinx' 'python-sphinx_rtd_theme' 'graphviz' 'imagemagick' 'git')
|
||||||
optdepends=('schedtool')
|
optdepends=('schedtool')
|
||||||
if pacman -Qq ccache &> /dev/null; then
|
options=('!strip')
|
||||||
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
|
|
||||||
source=("https://www.kernel.org/pub/linux/kernel/v5.x/linux-${_basekernel}.tar.xz"
|
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"
|
"https://www.kernel.org/pub/linux/kernel/v5.x/patch-${pkgver}.xz"
|
||||||
'config.x86_64' # stock Arch config
|
'config.x86_64' # stock Arch config
|
||||||
@ -901,6 +895,12 @@ build() {
|
|||||||
_force_all_threads="${MAKEFLAGS}"
|
_force_all_threads="${MAKEFLAGS}"
|
||||||
fi
|
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!
|
# 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 )
|
_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 )
|
||||||
}
|
}
|
||||||
|
@ -96,13 +96,7 @@ url="http://www.kernel.org/"
|
|||||||
license=('GPL2')
|
license=('GPL2')
|
||||||
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'libelf' 'patchutils' 'flex' 'python-sphinx' 'python-sphinx_rtd_theme' 'graphviz' 'imagemagick' 'git')
|
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'libelf' 'patchutils' 'flex' 'python-sphinx' 'python-sphinx_rtd_theme' 'graphviz' 'imagemagick' 'git')
|
||||||
optdepends=('schedtool')
|
optdepends=('schedtool')
|
||||||
if pacman -Qq ccache &> /dev/null; then
|
options=('!strip')
|
||||||
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
|
|
||||||
source=("https://www.kernel.org/pub/linux/kernel/v5.x/linux-${_basekernel}.tar.xz"
|
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"
|
"https://www.kernel.org/pub/linux/kernel/v5.x/patch-${pkgver}.xz"
|
||||||
'config.x86_64' # stock Arch config
|
'config.x86_64' # stock Arch config
|
||||||
@ -907,6 +901,12 @@ build() {
|
|||||||
_force_all_threads="${MAKEFLAGS}"
|
_force_all_threads="${MAKEFLAGS}"
|
||||||
fi
|
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!
|
# 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 )
|
_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 )
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user