linux-tkg: Switch from our local cpu optimizations patchset to Graysky's

https://github.com/graysky2/kernel_gcc_patch

Fixes https://github.com/Tk-Glitch/PKGBUILDS/issues/569
This commit is contained in:
Tk-Glitch
2020-06-22 17:09:22 +02:00
parent 63be6c5384
commit db6dab74c2
16 changed files with 80 additions and 2859 deletions

View File

@@ -93,6 +93,7 @@ makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'libelf' 'patchutils'
optdepends=('schedtool')
options=('!strip')
source=("https://git.kernel.org/torvalds/t/linux-${_basekernel}-${_sub}.tar.gz"
"https://raw.githubusercontent.com/graysky2/kernel_gcc_patch/master/enable_additional_cpu_optimizations_for_gcc_v10.1%2B_kernel_v5.8%2B.patch"
'config.x86_64' # stock Arch config
#'config_hardened.x86_64' # hardened Arch config
90-cleanup.hook
@@ -119,12 +120,13 @@ source=("https://git.kernel.org/torvalds/t/linux-${_basekernel}-${_sub}.tar.gz"
#0012-linux-hardened.patch
)
sha256sums=('096c637e492f25379c2130291b0cf938e7fff14206dd530b1f55b2ba54b9c40f'
'5ab29eb64e57df83b395a29a6a4f89030d142feffbfbf73b3afc6d97a2a7fd12'
'1bfe5ec855c8774f9cade253c0770d3691295ed03f4707abc76b0f29bb6fd67b'
'1e15fc2ef3fa770217ecc63a220e5df2ddbcf3295eb4a021171e7edd4c6cc898'
'66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997'
'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6'
'd02bf5ca08fd610394b9d3a0c3b176d74af206f897dee826e5cbaec97bb4a4aa'
'3c30d6645680d4818240dcf61172777791533fea18d00d2208e9863a338f8555'
'e36b6efad764eeede8cf90b4de6ef5f9241e8cf531530b33ee2e024e2961e9b5'
'7058e57fd68367b029adc77f2a82928f1433daaf02c8c279cb2d13556c8804d7'
'62496f9ca788996181ef145f96ad26291282fcc3fb95cdc04080dcf84365be33'
'7fd8e776209dac98627453fda754bdf9aff4a09f27cb0b3766d7983612eb3c74'
@@ -207,9 +209,15 @@ prepare() {
patch -Np1 -i ../0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
fi
# graysky's cpu opts - https://github.com/graysky2/kernel_gcc_patch
msg2 "Applying graysky's cpu opts patch"
patch -Np1 -i ../enable_additional_cpu_optimizations_for_gcc_v10.1%2B_kernel_v5.8%2B.patch
# TkG
msg2 "Applying clear linux patches"
patch -Np1 -i ../0002-clear-patches.patch
msg2 "Applying glitched base patch"
patch -Np1 -i ../0003-glitched-base.patch
if [ "${_cpusched}" == "MuQSS" ]; then
@@ -295,6 +303,8 @@ prepare() {
echo "# CONFIG_MGOLDMONT is not set" >> ./.config
echo "# CONFIG_MGOLDMONTPLUS is not set" >> ./.config
echo "# CONFIG_MCASCADELAKE is not set" >> ./.config
echo "# CONFIG_MCOOPERLAKE is not set" >> ./.config
echo "# CONFIG_MTIGERLAKE is not set" >> ./.config
# Disable some debugging
if [ "${_debugdisable}" == "true" ]; then
@@ -485,6 +495,10 @@ prepare() {
sed -i -e 's/# CONFIG_MGOLDMONTPLUS is not set/CONFIG_MGOLDMONTPLUS=y/' ./.config
elif [ "$_processor_opt" == "cascadelake" ]; then
sed -i -e 's/# CONFIG_MCASCADELAKE is not set/CONFIG_MCASCADELAKE=y/' ./.config
elif [ "$_processor_opt" == "cooperlake" ]; then
sed -i -e 's/# CONFIG_MCOOPERLAKE is not set/CONFIG_MCOOPERLAKE=y/' ./.config
elif [ "$_processor_opt" == "tigerlake" ]; then
sed -i -e 's/# CONFIG_MTIGERLAKE is not set/CONFIG_MTIGERLAKE=y/' ./.config
fi
# irq threading