summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoreggz2021-09-30 14:17:20 +0200
committereggz2021-09-30 14:17:20 +0200
commitcc84394ee13225ba1fbd4ae394305f68b1bf8d95 (patch)
tree72069cace5bc61c4f0c3a82025bc154777d6dc31
parentcbc331f9a2a104f31db7c43890437289e48a829f (diff)
downloadaur-cc84394ee13225ba1fbd4ae394305f68b1bf8d95.tar.gz
Updated + fix for headers
-rw-r--r--.SRCINFO8
-rw-r--r--5010_enable-cpu-optimizations-universal.patch79
-rw-r--r--PKGBUILD11
-rw-r--r--config.x86_6430
4 files changed, 65 insertions, 63 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d1a12bb74201..4910918bc1df 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
pkgbase = linux-amd-raven
- pkgver = 5.4.v.149
+ pkgver = 5.4.v.150
pkgrel = 1
url = https://www.kernel.org/
arch = x86_64
@@ -14,16 +14,16 @@ pkgbase = linux-amd-raven
makedepends = lzop
makedepends = gcc>=9.1
options = !strip
- source = git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git#tag=v5.4.149
+ source = git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git#tag=v5.4.150
source = config.x86_64
source = linux-amd-raven.preset
source = linux.install
source = 5010_enable-cpu-optimizations-universal.patch
sha256sums = SKIP
- sha256sums = 90586bd78f7a3b7d2a0b7e10888665b816085db966f52674624163185298d4f1
+ sha256sums = 6d856f0e979425b5a2438fcb392646dee4cdfdce716ce9ce51c851179cf9164e
sha256sums = fd220b9f47a86162247b042f06311848678f9acb64b92f716572972f3aeb3d18
sha256sums = d590e751ab4cf424b78fd0d57e53d187f07401a68c8b468d17a5f39a337dacf0
- sha256sums = 63eb599f217729e42dbb0840247412b16b2bd5365725d2488a0256295f71ccda
+ sha256sums = 09ea06911535871042973be08d65b923508eb38859a50a10ed68d88ff482395d
pkgname = linux-amd-raven
pkgdesc = Linux kernel with working amdgpu for Raven Ridge hardware
diff --git a/5010_enable-cpu-optimizations-universal.patch b/5010_enable-cpu-optimizations-universal.patch
index 2cc90b01023f..5b7cb95148a2 100644
--- a/5010_enable-cpu-optimizations-universal.patch
+++ b/5010_enable-cpu-optimizations-universal.patch
@@ -1,24 +1,18 @@
-From cda27318e4b73d20f0edb497dd86ed4c1d051ad6 Mon Sep 17 00:00:00 2001
+From 9abcc823066eabbe75ef07c9ce977757b538bf4f Mon Sep 17 00:00:00 2001
From: graysky <graysky@archlinux.us>
-Date: Mon, 12 Apr 2021 07:14:01 -0400
+Date: Sun, 6 Jun 2021 09:28:29 -0400
Subject: [PATCH] more uarches for kernel 4.19-5.4
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
-WARNING
-This patch works with all gcc versions 9.0+ and with kernel version 4.19-5.4
-and should NOT be applied when compiling on older versions of gcc due to key
-name changes of the march flags introduced with the version 4.9 release of
-gcc.[1]
-
FEATURES
This patch adds additional CPU options to the Linux kernel accessible under:
Processor type and features --->
Processor family --->
-With the release of gcc 11.0, several generic 64-bit levels are offered which
-are good for supported Intel or AMD CPUs:
+With the release of gcc 11.1 and clang 12.0, several generic 64-bit levels are
+offered which are good for supported Intel or AMD CPUs:
• x86-64-v2
• x86-64-v3
• x86-64-v4
@@ -27,7 +21,7 @@ Users of glibc 2.33 and above can see which level is supported by current
hardware by running:
/lib/ld-linux-x86-64.so.2 --help | grep supported
-Alternatively, compare the flags from /proc/cpuinfo to this list.[2]
+Alternatively, compare the flags from /proc/cpuinfo to this list.[1]
CPU-specific microarchitectures include:
• AMD Improved K8-family
@@ -63,13 +57,15 @@ CPU-specific microarchitectures include:
• Intel 12th Gen i3/i5/i7/i9-family (Alder Lake)‡
Notes: If not otherwise noted, gcc >=9.1 is required for support.
- *Requires gcc >=10.1 †Required gcc >=10.3 ‡Required gcc >=11.0
+ *Requires gcc >=10.1 or clang >=10.0
+ †Required gcc >=10.3 or clang >=12.0
+ ‡Required gcc >=11.1 or clang >=12.0
It also offers to compile passing the 'native' option which, "selects the CPU
to generate code for at compilation time by determining the processor type of
the compiling machine. Using -march=native enables all instruction subsets
supported by the local machine and will produce code optimized for the local
-machine under the constraints of the selected instruction set."[3]
+machine under the constraints of the selected instruction set."[2]
Users of Intel CPUs should select the 'Intel-Native' option and users of AMD
CPUs should select the 'AMD-Native' option.
@@ -77,9 +73,9 @@ CPUs should select the 'AMD-Native' option.
MINOR NOTES RELATING TO INTEL ATOM PROCESSORS
This patch also changes -march=atom to -march=bonnell in accordance with the
gcc v4.9 changes. Upstream is using the deprecated -match=atom flags when I
-believe it should use the newer -march=bonnell flag for atom processors.[4]
+believe it should use the newer -march=bonnell flag for atom processors.[3]
-It is not recommended to compile on Atom-CPUs with the 'native' option.[5] The
+It is not recommended to compile on Atom-CPUs with the 'native' option.[4] The
recommendation is to use the 'atom' option instead.
BENEFITS
@@ -91,18 +87,19 @@ https://github.com/graysky2/kernel_gcc_patch
REQUIREMENTS
linux version 4.19-5.4
-gcc version >=9.0
+gcc version >=9.0 or clang version >=9.0
ACKNOWLEDGMENTS
-This patch builds on the seminal work by Jeroen.[6]
+This patch builds on the seminal work by Jeroen.[5]
REFERENCES
-1. https://gcc.gnu.org/gcc-4.9/changes.html
-2. https://gitlab.com/x86-psABIs/x86-64-ABI/-/commit/77566eb03bc6a326811cb7e9
-3. https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#index-x86-Options
-4. https://bugzilla.kernel.org/show_bug.cgi?id=77461
-5. https://github.com/graysky2/kernel_gcc_patch/issues/15
-6. http://www.linuxforge.net/docs/linux/linux-gcc.php
+1. https://gitlab.com/x86-psABIs/x86-64-ABI/-/commit/77566eb03bc6a326811cb7e9
+2. https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#index-x86-Options
+3. https://bugzilla.kernel.org/show_bug.cgi?id=77461
+4. https://github.com/graysky2/kernel_gcc_patch/issues/15
+5. http://www.linuxforge.net/docs/linux/linux-gcc.php
+
+Signed-off-by: graysky <graysky@archlinux.us>
---
arch/x86/Kconfig.cpu | 333 ++++++++++++++++++++++++++++++++--
arch/x86/Makefile | 47 ++++-
@@ -110,7 +107,7 @@ REFERENCES
3 files changed, 428 insertions(+), 18 deletions(-)
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
-index 8e29c991ba3e..bc76256532bb 100644
+index 8e29c991ba3e..c74f92492a2e 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -148,9 +148,8 @@ config MPENTIUM4
@@ -224,7 +221,7 @@ index 8e29c991ba3e..bc76256532bb 100644
+
+config MZEN3
+ bool "AMD Zen 3"
-+ depends on GCC_VERSION > 100300
++ depends on (CC_IS_GCC && GCC_VERSION >= 100300) || (CC_IS_CLANG && CLANG_VERSION >= 120000)
+ ---help---
+ Select this for AMD Family 19h Zen 3 processors.
+
@@ -383,7 +380,7 @@ index 8e29c991ba3e..bc76256532bb 100644
+
+config MCOOPERLAKE
+ bool "Intel Cooper Lake"
-+ depends on GCC_VERSION > 100100
++ depends on (CC_IS_GCC && GCC_VERSION > 100100) || (CC_IS_CLANG && CLANG_VERSION >= 100000)
+ select X86_P6_NOP
+ ---help---
+
@@ -393,7 +390,7 @@ index 8e29c991ba3e..bc76256532bb 100644
+
+config MTIGERLAKE
+ bool "Intel Tiger Lake"
-+ depends on GCC_VERSION > 100100
++ depends on (CC_IS_GCC && GCC_VERSION > 100100) || (CC_IS_CLANG && CLANG_VERSION >= 100000)
+ select X86_P6_NOP
+ ---help---
+
@@ -403,7 +400,7 @@ index 8e29c991ba3e..bc76256532bb 100644
+
+config MSAPPHIRERAPIDS
+ bool "Intel Sapphire Rapids"
-+ depends on GCC_VERSION > 110000
++ depends on (CC_IS_GCC && GCC_VERSION > 110000) || (CC_IS_CLANG && CLANG_VERSION >= 120000)
+ select X86_P6_NOP
+ ---help---
+
@@ -413,7 +410,7 @@ index 8e29c991ba3e..bc76256532bb 100644
+
+config MROCKETLAKE
+ bool "Intel Rocket Lake"
-+ depends on GCC_VERSION > 110000
++ depends on (CC_IS_GCC && GCC_VERSION > 110000) || (CC_IS_CLANG && CLANG_VERSION >= 120000)
+ select X86_P6_NOP
+ ---help---
+
@@ -423,7 +420,7 @@ index 8e29c991ba3e..bc76256532bb 100644
+
+config MALDERLAKE
+ bool "Intel Alder Lake"
-+ depends on GCC_VERSION > 110000
++ depends on (CC_IS_GCC && GCC_VERSION > 110000) || (CC_IS_CLANG && CLANG_VERSION >= 120000)
+ select X86_P6_NOP
+ ---help---
+
@@ -440,7 +437,7 @@ index 8e29c991ba3e..bc76256532bb 100644
+config GENERIC_CPU2
+ bool "Generic-x86-64-v2"
-+ depends on GCC_VERSION > 110000
++ depends on (CC_IS_GCC && GCC_VERSION > 110000) || (CC_IS_CLANG && CLANG_VERSION >= 120000)
+ depends on X86_64
+ ---help---
+ Generic x86-64 CPU.
@@ -448,7 +445,7 @@ index 8e29c991ba3e..bc76256532bb 100644
+
+config GENERIC_CPU3
+ bool "Generic-x86-64-v3"
-+ depends on GCC_VERSION > 110000
++ depends on (CC_IS_GCC && GCC_VERSION > 110000) || (CC_IS_CLANG && CLANG_VERSION >= 120000)
+ depends on X86_64
+ ---help---
+ Generic x86-64-v3 CPU with v3 instructions.
@@ -456,18 +453,18 @@ index 8e29c991ba3e..bc76256532bb 100644
+
+config GENERIC_CPU4
+ bool "Generic-x86-64-v4"
-+ depends on GCC_VERSION > 110000
++ depends on (CC_IS_GCC && GCC_VERSION > 110000) || (CC_IS_CLANG && CLANG_VERSION >= 120000)
+ depends on X86_64
+ ---help---
+ Generic x86-64 CPU with v4 instructions.
+ Run equally well on all x86-64 CPUs with min support of x86-64-v4.
+
+config MNATIVE_INTEL
-+ bool "Intel-Native optimizations autodetected by GCC"
++ bool "Intel-Native optimizations autodetected by the compiler"
+ ---help---
+
-+ GCC 4.2 and above support -march=native, which automatically detects
-+ the optimum settings to use based on your processor. Do NOT use this
++ Clang 3.8 and GCC 4.2 and above support -march=native, which automatically
++ detects the optimum settings to use based on your processor. Do NOT use this
+ for AMD CPUs. Intel Only!
+
+ Enables -march=native
@@ -476,9 +473,9 @@ index 8e29c991ba3e..bc76256532bb 100644
+ bool "AMD-Native optimizations autodetected by GCC"
+ ---help---
+
-+ GCC 4.2 and above support -march=native, which automatically detects
-+ the optimum settings to use based on your processor. Do NOT use this
-+ for AMD CPUs. AMD Only!
++ Clang 3.8 and GCC 4.2 and above support -march=native, which automatically
++ detects the optimum settings to use based on your processor. Do NOT use this
++ for Intel CPUs. AMD Only!
+
+ Enables -march=native
+
@@ -541,10 +538,10 @@ index 8e29c991ba3e..bc76256532bb 100644
default "4"
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
-index 94df0868804b..09b1905de4cb 100644
+index 69f0cb01c666..3d9e20a11f1b 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
-@@ -121,11 +121,48 @@ else
+@@ -125,11 +125,48 @@ else
# FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu)
cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)
diff --git a/PKGBUILD b/PKGBUILD
index 7bcdeb592934..99b7373d46aa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,8 @@
pkgbase=linux-amd-raven
_srcname=linux
-gitver=v5.4.149
-pkgver=5.4.v.149
+gitver=v5.4.150
+pkgver=5.4.v.150
pkgrel=1
arch=('x86_64')
url="https://www.kernel.org/"
@@ -23,13 +23,13 @@ source=("git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git#ta
)
sha256sums=('SKIP'
#config.x86_64
- '90586bd78f7a3b7d2a0b7e10888665b816085db966f52674624163185298d4f1'
+ '6d856f0e979425b5a2438fcb392646dee4cdfdce716ce9ce51c851179cf9164e'
#.preset file
'fd220b9f47a86162247b042f06311848678f9acb64b92f716572972f3aeb3d18'
#linux install file
'd590e751ab4cf424b78fd0d57e53d187f07401a68c8b468d17a5f39a337dacf0'
#gentoopatch file
- '63eb599f217729e42dbb0840247412b16b2bd5365725d2488a0256295f71ccda'
+ '09ea06911535871042973be08d65b923508eb38859a50a10ed68d88ff482395d'
)
_kernelname=${pkgbase#linux}
@@ -174,8 +174,7 @@ _package-headers() {
cp Module.symvers "${pkgdir}/usr/lib/modules/${_kernver}/build"
cp -a scripts "${pkgdir}/usr/lib/modules/${_kernver}/build"
- # fix permissions on scripts dir
- chmod og-w -R "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts"
+ # Make tmpdir for versions
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/.tmp_versions"
# add kernel files to headers
diff --git a/config.x86_64 b/config.x86_64
index a50f38d075fb..2091a989601f 100644
--- a/config.x86_64
+++ b/config.x86_64
@@ -1,13 +1,13 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/x86 5.4.149 Kernel Configuration
+# Linux/x86 5.4.150 Kernel Configuration
#
#
-# Compiler: gcc (GCC) 11.1.0
+# Compiler: gcc (GCC) 10.2.0
#
CONFIG_CC_IS_GCC=y
-CONFIG_GCC_VERSION=110100
+CONFIG_GCC_VERSION=100200
CONFIG_CLANG_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_HAS_ASM_GOTO=y
@@ -348,7 +348,6 @@ CONFIG_JAILHOUSE_GUEST=y
# CONFIG_MEXCAVATOR is not set
CONFIG_MZEN=y
# CONFIG_MZEN2 is not set
-# CONFIG_MZEN3 is not set
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
# CONFIG_MATOM is not set
@@ -368,13 +367,7 @@ CONFIG_MZEN=y
# CONFIG_MCASCADELAKE is not set
# CONFIG_MCOOPERLAKE is not set
# CONFIG_MTIGERLAKE is not set
-# CONFIG_MSAPPHIRERAPIDS is not set
-# CONFIG_MROCKETLAKE is not set
-# CONFIG_MALDERLAKE is not set
# CONFIG_GENERIC_CPU is not set
-# CONFIG_GENERIC_CPU2 is not set
-# CONFIG_GENERIC_CPU3 is not set
-# CONFIG_GENERIC_CPU4 is not set
# CONFIG_MNATIVE_INTEL is not set
# CONFIG_MNATIVE_AMD is not set
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
@@ -847,8 +840,12 @@ CONFIG_ARCH_HAS_MEM_ENCRYPT=y
CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
# end of GCOV-based kernel profiling
-CONFIG_PLUGIN_HOSTCC=""
+CONFIG_PLUGIN_HOSTCC="g++"
CONFIG_HAVE_GCC_PLUGINS=y
+CONFIG_GCC_PLUGINS=y
+# CONFIG_GCC_PLUGIN_CYC_COMPLEXITY is not set
+# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set
+# CONFIG_GCC_PLUGIN_RANDSTRUCT is not set
# end of General architecture-dependent options
CONFIG_RT_MUTEXES=y
@@ -8390,11 +8387,20 @@ CONFIG_LSM="yama,loadpin,safesetid,integrity"
#
# Kernel hardening options
#
+CONFIG_GCC_PLUGIN_STRUCTLEAK=y
#
# Memory initialization
#
-CONFIG_INIT_STACK_NONE=y
+# CONFIG_INIT_STACK_NONE is not set
+# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set
+# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set
+CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y
+# CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE is not set
+CONFIG_GCC_PLUGIN_STACKLEAK=y
+CONFIG_STACKLEAK_TRACK_MIN_SIZE=100
+# CONFIG_STACKLEAK_METRICS is not set
+# CONFIG_STACKLEAK_RUNTIME_DISABLE is not set
# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set
# end of Memory initialization