commit f4c91d608d413740dac4195f93effb8ff8f05a3e
Author: Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com>
Date: Thu Apr 11 20:38:52 2024 +0200
Fix build on gcc-14
fix_efi_enabled_type.patch | 12 ++++++++++++
gcc-14.patch | 13 +++++++++++++
nvidia-340xx-kmod.spec | 9 ++++++++-
3 files changed, 33 insertions(+), 1 deletion(-)
---
diff --git a/fix_efi_enabled_type.patch b/fix_efi_enabled_type.patch
new file mode 100644
index 0000000..70ce1e6
--- /dev/null
+++ b/fix_efi_enabled_type.patch
@@ -0,0 +1,12 @@
+diff -Naur a/kernel/nv-linux.h b/kernel/nv-linux.h
+--- a/kernel/nv-linux.h 2023-09-11 17:08:50.919035000 +0200
++++ b/kernel/nv-linux.h 2024-04-11 20:08:16.180864120 +0200
+@@ -195,7 +195,7 @@
+ #endif
+ #elif !defined(NV_VMWARE) && \
+ (defined(NV_EFI_ENABLED_PRESENT) || defined(efi_enabled))
+-#define NV_EFI_ENABLED() efi_enabled
++#define NV_EFI_ENABLED() ((int)efi_enabled)
+ #else
+ #define NV_EFI_ENABLED() 0
+ #endif
diff --git a/gcc-14.patch b/gcc-14.patch
new file mode 100644
index 0000000..2d5a4e4
--- /dev/null
+++ b/gcc-14.patch
@@ -0,0 +1,13 @@
+diff -Naur a/kernel/conftest.sh b/kernel/conftest.sh
+--- a/kernel/conftest.sh 2024-04-08 20:42:51.187823000 +0200
++++ b/kernel/conftest.sh 2024-04-09 21:37:15.674481821 +0200
+@@ -158,7 +158,8 @@
+ build_cflags() {
+ BASE_CFLAGS="-O2 -D__KERNEL__ \
+ -DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\"
\
+--nostdinc -isystem $ISYSTEM"
++-nostdinc -isystem $ISYSTEM \
++-Wno-implicit-function-declaration -Wno-strict-prototypes"
+
+ if [ "$OUTPUT" != "$SOURCES" ]; then
+ OUTPUT_CFLAGS="-I$OUTPUT/include2 -I$OUTPUT/include"
diff --git a/nvidia-340xx-kmod.spec b/nvidia-340xx-kmod.spec
index 80eb899..0e42aa3 100644
--- a/nvidia-340xx-kmod.spec
+++ b/nvidia-340xx-kmod.spec
@@ -12,7 +12,7 @@ Name: nvidia-340xx-kmod
Epoch: 1
Version: 340.108
# Taken over by kmodtool
-Release: 30%{?dist}
+Release: 31%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -25,6 +25,8 @@ Patch2: kernel-6.3.1.patch
Patch3: kernel-6.5.2.patch
Patch4: kernel-6.6.1.patch
Patch5: kernel-6.6.8.patch
+Patch6: gcc-14.patch
+Patch7: fix_efi_enabled_type.patch
BuildRequires: elfutils-libelf-devel
BuildRequires: gcc
@@ -57,6 +59,8 @@ tar --use-compress-program xz -xf
%{_datadir}/%{name}-%{version}/%{name}-%{versi
%patch 3 -p1
%patch 4 -p1
%patch 5 -p1
+%patch 6 -p1
+%patch 7 -p1
for kernel_version in %{?kernel_versions} ; do
cp -a kernel _kmod_build_${kernel_version%%___*}
@@ -85,6 +89,9 @@ done
%{?akmod_install}
%changelog
+* Thu Apr 11 2024 Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com> - 1:340.108-31
+- Fix build on gcc-14
+
* Fri Mar 29 2024 Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com> - 1:340.108-30
- Fix build on kernel-6.8.2
Show replies by date