diff --git a/linux-cachyos/PKGBUILD b/linux-cachyos/PKGBUILD index 2f2e20b3..4f8ca0fd 100644 --- a/linux-cachyos/PKGBUILD +++ b/linux-cachyos/PKGBUILD @@ -112,11 +112,14 @@ _use_auto_optimization=${_use_auto_optimization-y} _use_llvm_lto=${_use_llvm_lto-thin} # Use suffix -lto only when requested by the user -# Enabled by default. # y - enable -lto suffix # n - disable -lto suffix # https://github.com/CachyOS/linux-cachyos/issues/36 -_use_lto_suffix=${_use_lto_suffix-y} +_use_lto_suffix=${_use_lto_suffix-} + +# Use suffix -gcc when requested by the user +# Enabled by default to show the difference between LTO kernels and GCC kernels +_use_gcc_suffix=${_use_gcc_suffix-y} # KCFI is a proposed forward-edge control-flow integrity scheme for # Clang, which is more suitable for kernel use than the existing CFI @@ -148,13 +151,14 @@ _is_lto_kernel() { _build_debug=${_build_debug-} if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then - _pkgsuffix=cachyos - pkgbase="linux-$_pkgsuffix" - -elif [ -n "$_use_llvm_lto" ] || [[ "$_use_lto_suffix" = "n" ]]; then + _pkgsuffix=cachyos-lto +elif [ "$_use_llvm_lto" = "none" ] && [ -z "_use_kcfi" ] && [ "$_use_gcc_suffix" = "y" ]; then _pkgsuffix=cachyos-gcc - pkgbase="linux-$_pkgsuffix" +else + _pkgsuffix=cachyos fi + +pkgbase="linux-$_pkgsuffix" _major=6.11 _minor=2 #_minorc=$((_minor+1))