summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoregnappahz2020-05-15 12:35:41 +0200
committeregnappahz2020-05-15 12:35:41 +0200
commit9c7c1bcdf3a9cb0eccd3ebe586a676b15f699660 (patch)
treecc0b98ce4b9cc8aef01fab7c329403d94883884b
parentd07718f309828fc16428758d74de24048c4510b2 (diff)
downloadaur-9c7c1bcdf3a9cb0eccd3ebe586a676b15f699660.tar.gz
disabled stack canaries + gcc-10 supression patch
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD11
-rw-r--r--config.x86_6425
-rw-r--r--gcc10.patch87
4 files changed, 105 insertions, 24 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 785d13da0ead..03a5300a75c7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = linux-amd
pkgver = 5.6.v.13
- pkgrel = 1
+ pkgrel = 2
url = https://www.kernel.org/
arch = x86_64
license = GPL2
@@ -16,10 +16,12 @@ pkgbase = linux-amd
source = config.x86_64
source = linux-amd.preset
source = 5012_enable-cpu-optimizations-for-gcc91.patch
+ source = gcc10.patch
sha256sums = SKIP
- sha256sums = eb582df81485527671c267853465f81c210a8008c0456669f572b905025fa918
+ sha256sums = 57e1a2f3cdc11595adb3766d598feb4a7170a9135eac862916d78648af3ecbf9
sha256sums = 71caf34adf69e9e2567a38cfc951d1c60b13dbe87f58a9acfeb3fe48ffdc9d08
sha256sums = cc739c9c9f7ce08e6bbc161b8232208bbc00820342a32fb1f69bff6326ae1370
+ sha256sums = 97ac1bff7beb5205b89b5199c471ca076023718e52be3d77e219128811337301
pkgname = linux-amd
pkgdesc = Linux kernel for AMD CPU based hardware
diff --git a/PKGBUILD b/PKGBUILD
index fb1834aabf65..91e7b5032150 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@ pkgbase=linux-amd
_srcname=linux
gitver=v5.6.13
pkgver=5.6.v.13
-pkgrel=1
+pkgrel=2
arch=('x86_64')
url="https://www.kernel.org/"
license=('GPL2')
@@ -21,14 +21,18 @@ source=('git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git'
"${pkgbase}.preset"
# patch from our gentoo overlords
5012_enable-cpu-optimizations-for-gcc91.patch
+ # dear-gcc10-please-ignore-the-mess patch
+ gcc10.patch
)
sha256sums=('SKIP'
#config.x86_64
- 'eb582df81485527671c267853465f81c210a8008c0456669f572b905025fa918'
+ '57e1a2f3cdc11595adb3766d598feb4a7170a9135eac862916d78648af3ecbf9'
#.preset file
'71caf34adf69e9e2567a38cfc951d1c60b13dbe87f58a9acfeb3fe48ffdc9d08'
#patch gentoo
'cc739c9c9f7ce08e6bbc161b8232208bbc00820342a32fb1f69bff6326ae1370'
+ # dear-gcc10-please-ignore-the-mess patch
+ '97ac1bff7beb5205b89b5199c471ca076023718e52be3d77e219128811337301'
)
_kernelname=${pkgbase#linux}
@@ -54,6 +58,9 @@ prepare() {
# Implement cpu optimisation (MZEN2) patch from our gentoo lords
git apply ../5012_enable-cpu-optimizations-for-gcc91.patch
+ # ask gcc10 for forgiveness in these early times patch
+ git apply ../gcc10.patch
+
# get kernel version
yes "" | make prepare
diff --git a/config.x86_64 b/config.x86_64
index 8a299ddae73c..5eaf9e91bfed 100644
--- a/config.x86_64
+++ b/config.x86_64
@@ -4,15 +4,14 @@
#
#
-# Compiler: gcc (Arch Linux 9.3.0-1) 9.3.0
+# Compiler: gcc (GCC) 10.1.0
#
CONFIG_CC_IS_GCC=y
-CONFIG_GCC_VERSION=90300
+CONFIG_GCC_VERSION=100100
CONFIG_CLANG_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_HAS_ASM_GOTO=y
CONFIG_CC_HAS_ASM_INLINE=y
-CONFIG_CC_HAS_WARN_MAYBE_UNINITIALIZED=y
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_TABLE_SORT=y
CONFIG_THREAD_INFO_IN_TASK=y
@@ -801,8 +800,7 @@ CONFIG_SECCOMP_FILTER=y
CONFIG_HAVE_ARCH_STACKLEAK=y
CONFIG_HAVE_STACKPROTECTOR=y
CONFIG_CC_HAS_STACKPROTECTOR_NONE=y
-CONFIG_STACKPROTECTOR=y
-CONFIG_STACKPROTECTOR_STRONG=y
+# CONFIG_STACKPROTECTOR is not set
CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=y
CONFIG_HAVE_CONTEXT_TRACKING=y
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
@@ -848,12 +846,8 @@ CONFIG_ARCH_HAS_MEM_ENCRYPT=y
CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
# end of GCOV-based kernel profiling
-CONFIG_PLUGIN_HOSTCC="g++"
+CONFIG_PLUGIN_HOSTCC=""
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
@@ -8543,20 +8537,11 @@ CONFIG_LSM="yama,loadpin,safesetid,integrity"
#
# Kernel hardening options
#
-CONFIG_GCC_PLUGIN_STRUCTLEAK=y
#
# Memory initialization
#
-# 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_STACK_NONE=y
# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set
# end of Memory initialization
diff --git a/gcc10.patch b/gcc10.patch
new file mode 100644
index 000000000000..cad51f61e1b9
--- /dev/null
+++ b/gcc10.patch
@@ -0,0 +1,87 @@
+commit 3a58245198d7ea9521e1a856111df27f22822cb6
+Author: egnappahz <egnappah@gmail.com>
+Date: Fri May 15 12:21:43 2020 +0200
+
+ disable warning as errors for gcc10
+
+ Signed-off-by: egnappahz <egnappah@gmail.com>
+
+diff --git a/Makefile b/Makefile
+index d252219666fd..d4938ac6ebbf 100644
+--- a/Makefile
++++ b/Makefile
+@@ -708,10 +708,6 @@ else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
+ KBUILD_CFLAGS += -Os
+ endif
+
+-ifdef CONFIG_CC_DISABLE_WARN_MAYBE_UNINITIALIZED
+-KBUILD_CFLAGS += -Wno-maybe-uninitialized
+-endif
+-
+ # Tell gcc to never replace conditional load with a non-conditional one
+ KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0)
+
+@@ -861,6 +857,9 @@ KBUILD_CFLAGS += -Wno-pointer-sign
+ # disable stringop warnings in gcc 8+
+ KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)
+
++# Enabled with W=2, disabled by default as noisy
++KBUILD_CFLAGS += $(call cc-disable-warning, maybe-uninitialized)
++
+ # disable invalid "can't wrap" optimizations for signed / pointers
+ KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)
+
+diff --git a/init/Kconfig b/init/Kconfig
+index 4f717bfdbfe2..ef59c5c36cdb 100644
+--- a/init/Kconfig
++++ b/init/Kconfig
+@@ -36,22 +36,6 @@ config TOOLS_SUPPORT_RELR
+ config CC_HAS_ASM_INLINE
+ def_bool $(success,echo 'void foo(void) { asm inline (""); }' | $(CC) -x c - -c -o /dev/null)
+
+-config CC_HAS_WARN_MAYBE_UNINITIALIZED
+- def_bool $(cc-option,-Wmaybe-uninitialized)
+- help
+- GCC >= 4.7 supports this option.
+-
+-config CC_DISABLE_WARN_MAYBE_UNINITIALIZED
+- bool
+- depends on CC_HAS_WARN_MAYBE_UNINITIALIZED
+- default CC_IS_GCC && GCC_VERSION < 40900 # unreliable for GCC < 4.9
+- help
+- GCC's -Wmaybe-uninitialized is not reliable by definition.
+- Lots of false positive warnings are produced in some cases.
+-
+- If this option is enabled, -Wno-maybe-uninitialzed is passed
+- to the compiler to suppress maybe-uninitialized warnings.
+-
+ config CONSTRUCTORS
+ bool
+ depends on !UML
+@@ -1249,14 +1233,12 @@ config CC_OPTIMIZE_FOR_PERFORMANCE
+ config CC_OPTIMIZE_FOR_PERFORMANCE_O3
+ bool "Optimize more for performance (-O3)"
+ depends on ARC
+- imply CC_DISABLE_WARN_MAYBE_UNINITIALIZED # avoid false positives
+ help
+ Choosing this option will pass "-O3" to your compiler to optimize
+ the kernel yet more for performance.
+
+ config CC_OPTIMIZE_FOR_SIZE
+ bool "Optimize for size (-Os)"
+- imply CC_DISABLE_WARN_MAYBE_UNINITIALIZED # avoid false positives
+ help
+ Choosing this option will pass "-Os" to your compiler resulting
+ in a smaller kernel.
+diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
+index 402eef84c859..743647005f64 100644
+--- a/kernel/trace/Kconfig
++++ b/kernel/trace/Kconfig
+@@ -466,7 +466,6 @@ config PROFILE_ANNOTATED_BRANCHES
+ config PROFILE_ALL_BRANCHES
+ bool "Profile all if conditionals" if !FORTIFY_SOURCE
+ select TRACE_BRANCH_PROFILING
+- imply CC_DISABLE_WARN_MAYBE_UNINITIALIZED # avoid false positives
+ help
+ This tracer profiles all branch conditions. Every if ()
+ taken in the kernel is recorded whether it hit or miss.