Skip to content

Archlinux Kernel based on different schedulers and some other performance improvements.

Fix LTO&kCFI (#217)

Aarrayy1bfdfc772536
diff --git a/linux-bore/PKGBUILD b/linux-bore/PKGBUILD
index f832784e..442a4acd 100644
--- a/linux-bore/PKGBUILD
+++ b/linux-bore/PKGBUILD
@@ -257,8 +257,8 @@ if [ -n "$_lrng_enable" ]; then
source+=("${_patchsource}/misc/0001-lrng.patch")
fi
-# gcc specific flags
-if [ "$_use_llvm_lto" = "none" ]; then
+# GCC specific flags
+if [[ "$_use_llvm_lto" = "none" ]] && [[ -z "$_use_kcfi" ]]; then
source+=("${_patchsource}/misc/0001-Add-extra-GCC-optimization-flags.patch")
fi
diff --git a/linux-cachyos-bore/PKGBUILD b/linux-cachyos-bore/PKGBUILD
index f8d60175..0cad8c9c 100644
--- a/linux-cachyos-bore/PKGBUILD
+++ b/linux-cachyos-bore/PKGBUILD
@@ -253,8 +253,8 @@ if [ -n "$_lrng_enable" ]; then
source+=("${_patchsource}/misc/0001-lrng.patch")
fi
-# gcc specific flags
-if [ "$_use_llvm_lto" = "none" ]; then
+# GCC specific flags
+if [[ "$_use_llvm_lto" = "none" ]] && [[ -z "$_use_kcfi" ]]; then
source+=("${_patchsource}/misc/0001-Add-extra-GCC-optimization-flags.patch")
fi
diff --git a/linux-cachyos-eevdf/PKGBUILD b/linux-cachyos-eevdf/PKGBUILD
index 4265ffec..396e9fad 100644
--- a/linux-cachyos-eevdf/PKGBUILD
+++ b/linux-cachyos-eevdf/PKGBUILD
@@ -257,8 +257,8 @@ if [ -n "$_lrng_enable" ]; then
source+=("${_patchsource}/misc/0001-lrng.patch")
fi
-# gcc specific flags
-if [ "$_use_llvm_lto" = "none" ]; then
+# GCC specific flags
+if [[ "$_use_llvm_lto" = "none" ]] && [[ -z "$_use_kcfi" ]]; then
source+=("${_patchsource}/misc/0001-Add-extra-GCC-optimization-flags.patch")
fi
diff --git a/linux-cachyos-hardened/PKGBUILD b/linux-cachyos-hardened/PKGBUILD
index 1d6b1311..eacb4b7c 100644
--- a/linux-cachyos-hardened/PKGBUILD
+++ b/linux-cachyos-hardened/PKGBUILD
@@ -252,8 +252,8 @@ if [ -n "$_lrng_enable" ]; then
source+=("${_patchsource}/misc/0001-lrng.patch")
fi
-# gcc specific flags
-if [ "$_use_llvm_lto" = "none" ]; then
+# GCC specific flags
+if [[ "$_use_llvm_lto" = "none" ]] && [[ -z "$_use_kcfi" ]]; then
source+=("${_patchsource}/misc/0001-Add-extra-GCC-optimization-flags.patch")
fi
diff --git a/linux-cachyos-lts/PKGBUILD b/linux-cachyos-lts/PKGBUILD
index cc793f92..989c2fbc 100644
--- a/linux-cachyos-lts/PKGBUILD
+++ b/linux-cachyos-lts/PKGBUILD
@@ -250,8 +250,8 @@ if [ -n "$_lrng_enable" ]; then
source+=("${_patchsource}/misc/0001-lrng.patch")
fi
-# gcc specific flags
-if [ "$_use_llvm_lto" = "none" ]; then
+# GCC specific flags
+if [[ "$_use_llvm_lto" = "none" ]] && [[ -z "$_use_kcfi" ]]; then
source+=("${_patchsource}/misc/0001-Add-extra-GCC-optimization-flags.patch")
fi
diff --git a/linux-cachyos-rc/PKGBUILD b/linux-cachyos-rc/PKGBUILD
index d00c3afd..ca3bfc05 100644
--- a/linux-cachyos-rc/PKGBUILD
+++ b/linux-cachyos-rc/PKGBUILD
@@ -257,8 +257,8 @@ if [ -n "$_lrng_enable" ]; then
source+=("${_patchsource}/misc/0001-lrng.patch")
fi
-# gcc specific flags
-if [ "$_use_llvm_lto" = "none" ]; then
+# GCC specific flags
+if [[ "$_use_llvm_lto" = "none" ]] && [[ -z "$_use_kcfi" ]]; then
source+=("${_patchsource}/misc/0001-Add-extra-GCC-optimization-flags.patch")
fi
diff --git a/linux-cachyos-rt-bore/PKGBUILD b/linux-cachyos-rt-bore/PKGBUILD
index 2232b7e8..524dfe14 100644
--- a/linux-cachyos-rt-bore/PKGBUILD
+++ b/linux-cachyos-rt-bore/PKGBUILD
@@ -257,8 +257,8 @@ if [ -n "$_lrng_enable" ]; then
source+=("${_patchsource}/misc/0001-lrng.patch")
fi
-# gcc specific flags
-if [ "$_use_llvm_lto" = "none" ]; then
+# GCC specific flags
+if [[ "$_use_llvm_lto" = "none" ]] && [[ -z "$_use_kcfi" ]]; then
source+=("${_patchsource}/misc/0001-Add-extra-GCC-optimization-flags.patch")
fi
diff --git a/linux-cachyos-rt/PKGBUILD b/linux-cachyos-rt/PKGBUILD
index af0c96b5..c14e147f 100644
--- a/linux-cachyos-rt/PKGBUILD
+++ b/linux-cachyos-rt/PKGBUILD
@@ -257,8 +257,8 @@ if [ -n "$_lrng_enable" ]; then
source+=("${_patchsource}/misc/0001-lrng.patch")
fi
-# gcc specific flags
-if [ "$_use_llvm_lto" = "none" ]; then
+# GCC specific flags
+if [[ "$_use_llvm_lto" = "none" ]] && [[ -z "$_use_kcfi" ]]; then
source+=("${_patchsource}/misc/0001-Add-extra-GCC-optimization-flags.patch")
fi
diff --git a/linux-cachyos-sched-ext/PKGBUILD b/linux-cachyos-sched-ext/PKGBUILD
index 89851f40..b35ee229 100644
--- a/linux-cachyos-sched-ext/PKGBUILD
+++ b/linux-cachyos-sched-ext/PKGBUILD
@@ -257,8 +257,8 @@ if [ -n "$_lrng_enable" ]; then
source+=("${_patchsource}/misc/0001-lrng.patch")
fi
-# gcc specific flags
-if [ "$_use_llvm_lto" = "none" ]; then
+# GCC specific flags
+if [[ "$_use_llvm_lto" = "none" ]] && [[ -z "$_use_kcfi" ]]; then
source+=("${_patchsource}/misc/0001-Add-extra-GCC-optimization-flags.patch")
fi
diff --git a/linux-cachyos/PKGBUILD b/linux-cachyos/PKGBUILD
index 320f90a1..0b20fe02 100644
--- a/linux-cachyos/PKGBUILD
+++ b/linux-cachyos/PKGBUILD
@@ -256,8 +256,8 @@ if [ -n "$_lrng_enable" ]; then
source+=("${_patchsource}/misc/0001-lrng.patch")
fi
-# gcc specific flags
-if [ "$_use_llvm_lto" = "none" ]; then
+# GCC specific flags
+if [[ "$_use_llvm_lto" = "none" ]] && [[ -z "$_use_kcfi" ]]; then
source+=("${_patchsource}/misc/0001-Add-extra-GCC-optimization-flags.patch")
fi