[packages/xorg-driver-video-nvidia-legacy-390xx] - simplify kernel 6.15 patch to not break 5.4 build

baggins baggins at pld-linux.org
Sun Jun 15 14:34:03 CEST 2025


commit 4bcf7b09a59f12ac341292102e1ee662e3897eab
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Jun 15 15:48:17 2025 +0200

    - simplify kernel 6.15 patch to not break 5.4 build

 gcc14.patch                                |  2 +-
 gcc15.patch                                |  2 +-
 kernel-6.15-x86.patch                      | 40 ----------------------------
 kernel-6.15-x8664.patch                    | 42 ------------------------------
 kernel-6.15.patch                          | 12 +++++++++
 xorg-driver-video-nvidia-legacy-390xx.spec |  9 -------
 6 files changed, 14 insertions(+), 93 deletions(-)
---
diff --git a/xorg-driver-video-nvidia-legacy-390xx.spec b/xorg-driver-video-nvidia-legacy-390xx.spec
index 8b5138f..fcdad70 100644
--- a/xorg-driver-video-nvidia-legacy-390xx.spec
+++ b/xorg-driver-video-nvidia-legacy-390xx.spec
@@ -67,8 +67,6 @@ Patch14:	kernel-6.13.patch
 Patch15:	kernel-6.14.patch
 Patch16:	gcc15.patch
 Patch17:	kernel-6.15.patch
-Patch18:	kernel-6.15-x8664.patch
-Patch19:	kernel-6.15-x86.patch
 URL:		https://www.nvidia.com/en-us/drivers/unix/
 BuildRequires:	rpm-build >= 4.6
 BuildRequires:	rpmbuild(macros) >= 1.752
@@ -354,13 +352,6 @@ rm -rf NVIDIA-Linux-x86*-%{version}*
 %patch -P 15 -p1
 %patch -P 16 -p1
 %patch -P 17 -p1
-%ifarch %{x8664}
-%patch -P 18 -p1
-%endif
-%ifarch %{ix86}
-%patch -P 19 -p1
-%endif
-echo 'EXTRA_CFLAGS += -Wno-int-conversion' >> kernel/Kbuild
 
 %build
 %{?with_kernel:%{expand:%build_kernel_packages}}
diff --git a/gcc14.patch b/gcc14.patch
index 110c3d6..e91b5d3 100644
--- a/gcc14.patch
+++ b/gcc14.patch
@@ -8,7 +8,7 @@ index 093704c..a9db899 100755
  -DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
 --nostdinc -isystem $ISYSTEM"
 +-nostdinc -isystem $ISYSTEM \
-+-Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-incompatible-pointer-types"
++-Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-incompatible-pointer-types -Wno-int-conversion"
  
      if [ "$OUTPUT" != "$SOURCES" ]; then
          OUTPUT_CFLAGS="-I$OUTPUT/include2 -I$OUTPUT/include"
diff --git a/gcc15.patch b/gcc15.patch
index bb7d3f4..a0de676 100644
--- a/gcc15.patch
+++ b/gcc15.patch
@@ -22,4 +22,4 @@ index 4da7588..1106ea5 100755
 +    BASE_CFLAGS="-std=gnu17 -O2 -D__KERNEL__ \
  -DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
  -nostdinc -isystem $ISYSTEM \
- -Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-incompatible-pointer-types"
+ -Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-incompatible-pointer-types -Wno-int-conversion"
diff --git a/kernel-6.15-x86.patch b/kernel-6.15-x86.patch
deleted file mode 100644
index 207d361..0000000
--- a/kernel-6.15-x86.patch
+++ /dev/null
@@ -1,40 +0,0 @@
---- NVIDIA-Linux-x86-390.157/kernel/Kbuild.orig	2025-06-14 15:50:06.049998893 +0200
-+++ NVIDIA-Linux-x86-390.157/kernel/Kbuild	2025-06-14 15:51:59.056665540 +0200
-@@ -54,28 +54,21 @@
-  $(eval include $(src)/$(_module)/$(_module).Kbuild))
- 
- 
--#
--# Define CFLAGS that apply to all the NVIDIA kernel modules. EXTRA_CFLAGS
--# is deprecated since 2.6.24 in favor of ccflags-y, but we need to support
--# older kernels which do not have ccflags-y. Newer kernels append
--# $(EXTRA_CFLAGS) to ccflags-y for compatibility.
--#
--
--EXTRA_CFLAGS += -std=gnu17
--EXTRA_CFLAGS += -I$(src)/common/inc
--EXTRA_CFLAGS += -I$(src)
--EXTRA_CFLAGS += -Wall -MD $(DEFINES) $(INCLUDES) -Wsign-compare -Wno-cast-qual -Wno-error
--EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"390.157\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -Wno-sign-compare -Wno-format-extra-args
--EXTRA_CFLAGS += $(call cc-option,-Werror=undef,)
--EXTRA_CFLAGS += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
--EXTRA_CFLAGS += -DNV_KERNEL_INTERFACE_LAYER
-+ccflags-y += -std=gnu17
-+ccflags-y += -I$(src)/common/inc
-+ccflags-y += -I$(src)
-+ccflags-y += -Wall -MD $(DEFINES) $(INCLUDES) -Wsign-compare -Wno-cast-qual -Wno-error
-+ccflags-y += -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"390.157\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -Wno-sign-compare -Wno-format-extra-args
-+ccflags-y += $(call cc-option,-Werror=undef,)
-+ccflags-y += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
-+ccflags-y += -DNV_KERNEL_INTERFACE_LAYER
- 
- #
- # Detect SGI UV systems and apply system-specific optimizations.
- #
- 
- ifneq ($(wildcard /proc/sgi_uv),)
-- EXTRA_CFLAGS += -DNV_CONFIG_X86_UV
-+ ccflags-y += -DNV_CONFIG_X86_UV
- endif
- 
- 
diff --git a/kernel-6.15-x8664.patch b/kernel-6.15-x8664.patch
deleted file mode 100644
index 6b23470..0000000
--- a/kernel-6.15-x8664.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff --git a/kernel/Kbuild b/kernel/Kbuild
-index baa6986..7324345 100644
---- a/kernel/Kbuild
-+++ b/kernel/Kbuild
-@@ -54,28 +54,21 @@ $(foreach _module, $(NV_KERNEL_MODULES), \
-  $(eval include $(src)/$(_module)/$(_module).Kbuild))
- 
- 
--#
--# Define CFLAGS that apply to all the NVIDIA kernel modules. EXTRA_CFLAGS
--# is deprecated since 2.6.24 in favor of ccflags-y, but we need to support
--# older kernels which do not have ccflags-y. Newer kernels append
--# $(EXTRA_CFLAGS) to ccflags-y for compatibility.
--#
--
--EXTRA_CFLAGS += -std=gnu17
--EXTRA_CFLAGS += -I$(src)/common/inc
--EXTRA_CFLAGS += -I$(src)
--EXTRA_CFLAGS += -Wall -MD $(DEFINES) $(INCLUDES) -Wsign-compare -Wno-cast-qual -Wno-error
--EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"390.157\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -Wno-sign-compare -Wno-format-extra-args
--EXTRA_CFLAGS += $(call cc-option,-Werror=undef,)
--EXTRA_CFLAGS += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
--EXTRA_CFLAGS += -DNV_KERNEL_INTERFACE_LAYER
-+ccflags-y += -std=gnu17
-+ccflags-y += -I$(src)/common/inc
-+ccflags-y += -I$(src)
-+ccflags-y += -Wall -MD $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-error -Wno-format-extra-args
-+ccflags-y += -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"390.157\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE
-+ccflags-y += $(call cc-option,-Werror=undef,)
-+ccflags-y += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
-+ccflags-y += -DNV_KERNEL_INTERFACE_LAYER
- 
- #
- # Detect SGI UV systems and apply system-specific optimizations.
- #
- 
- ifneq ($(wildcard /proc/sgi_uv),)
-- EXTRA_CFLAGS += -DNV_CONFIG_X86_UV
-+ ccflags-y += -DNV_CONFIG_X86_UV
- endif
- 
- 
diff --git a/kernel-6.15.patch b/kernel-6.15.patch
index cca9cd9..6163259 100644
--- a/kernel-6.15.patch
+++ b/kernel-6.15.patch
@@ -1,3 +1,15 @@
+diff --git a/kernel/Kbuild b/kernel/Kbuild
+index baa6986..7324345 100644
+--- a/kernel/Kbuild
++++ b/kernel/Kbuild
+@@ -88,6 +88,7 @@
+ endif
+ 
+ 
++ccflags-y += $(EXTRA_CFLAGS)
+ #
+ # The conftest.sh script tests various aspects of the target kernel.
+ # The per-module Kbuild files included above should:
 diff --git a/kernel/common/inc/nv-mm.h b/kernel/common/inc/nv-mm.h
 index acd396d..1e955a4 100644
 --- a/kernel/common/inc/nv-mm.h
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-nvidia-legacy-390xx.git/commitdiff/4bcf7b09a59f12ac341292102e1ee662e3897eab



More information about the pld-cvs-commit mailing list