diff --git a/SPECS/kernel-6.1.spec b/SPECS/kernel-6.1.spec index 2736240..65abfee 100644 --- a/SPECS/kernel-6.1.spec +++ b/SPECS/kernel-6.1.spec @@ -6,18 +6,14 @@ %ifarch x86_64 %define with_toolchain_clang 1 %define with_clang_lto 1 +%else +%define with_toolchain_clang 0 +%define with_clang_lto 0 %endif %if %{with_toolchain_clang} %global toolchain clang %endif - -# Compile the kernel with LTO (only supported when building with clang). -%bcond_with clang_lto - -%if %{with_clang_lto} && %{without_toolchain_clang} -{error:clang_lto requires --with toolchain_clang} -%endif # The libexec directory is not used by the linker, so the shared object there # should not be exported to RPM provides. @@ -214,11 +210,11 @@ BuildRequires: gzip, hmaccalc, hostname, kernel-rpm-macros >= 185-9, kmod, m4, m BuildRequires: patch, perl-Carp, perl-devel, perl-generators, perl-interpreter, python3-devel BuildRequires: redhat-rpm-config, tar, which, xz -%if %{with toolchain_clang} +%if %{with_toolchain_clang} BuildRequires: clang %endif -%if %{with clang_lto} +%if %{with_clang_lto} BuildRequires: llvm BuildRequires: lld %endif