Compare commits

..

No commits in common. "3f0c80f8bb752b4e3845017c692d532562a2dfb7" and "19b421152ceb7dfc354d90ed943edcfee7e07b1e" have entirely different histories.

View file

@ -65,8 +65,7 @@
%if %{_build_lto} %if %{_build_lto}
# Define build environment variables to build the kernel with clang # Define build environment variables to build the kernel with clang
%define _lto_args CC=gcc CXX=g++ LD=ld.bfd %define _lto_args CC=clang CXX=clang++ LD=ld.lld LLVM=1 LLVM_IAS=1
#KCFLAGS="-flto -ffat-lto-objects" KCPPFLAGS="-flto -ffat-lto-objects"
%endif %endif
%define _module_args KERNEL_UNAME=%{_kver} IGNORE_PREEMPT_RT_PRESENCE=1 SYSSRC=%{_builddir}/linux-%{_tarkver} SYSOUT=%{_builddir}/linux-%{_tarkver} %define _module_args KERNEL_UNAME=%{_kver} IGNORE_PREEMPT_RT_PRESENCE=1 SYSSRC=%{_builddir}/linux-%{_tarkver} SYSOUT=%{_builddir}/linux-%{_tarkver}
@ -104,6 +103,12 @@ BuildRequires: python3-devel
BuildRequires: python3-pyyaml BuildRequires: python3-pyyaml
BuildRequires: python-srpm-macros BuildRequires: python-srpm-macros
%if %{_build_lto}
BuildRequires: clang
BuildRequires: lld
BuildRequires: llvm
%endif
%if %{_build_nv} %if %{_build_nv}
BuildRequires: gcc-c++ BuildRequires: gcc-c++
%endif %endif
@ -126,6 +131,9 @@ Source10: https://github.com/NVIDIA/open-gpu-kernel-modules/archive/%{_nv_
Patch0: %{_patch_src}/all/0001-cachyos-base-all.patch Patch0: %{_patch_src}/all/0001-cachyos-base-all.patch
Patch1: %{_patch_src}/sched/0001-bore-cachy.patch Patch1: %{_patch_src}/sched/0001-bore-cachy.patch
%if %{_build_lto}
Patch2: %{_patch_src}/misc/dkms-clang.patch
%endif
%if %{_build_nv} %if %{_build_nv}
Patch10: %{_patch_src}/misc/nvidia/%{?_nv_old:565}/0001-Make-modeset-and-fbdev-default-enabled.patch Patch10: %{_patch_src}/misc/nvidia/%{?_nv_old:565}/0001-Make-modeset-and-fbdev-default-enabled.patch
@ -176,10 +184,7 @@ Patch13: %{_patch_src}/misc/nvidia/565/0005-nvkms-Sanitize-trim-ELD-produ
scripts/config -e MSKYLAKE scripts/config -e MSKYLAKE
%if %{_build_lto} %if %{_build_lto}
scripts/config -e LTO scripts/config -e LTO_CLANG_THIN
scripts/config -e LTO_GCC
scripts/config -d LTO_CLANG
scripts/config -d LTO_CLANG_THIN
%endif %endif
%if %{_build_minimal} %if %{_build_minimal}