From 2ac1ca550b697bcd3b71fcf728f45daabdcb4007 Mon Sep 17 00:00:00 2001 From: Gilver Date: Sat, 31 May 2025 00:45:58 -0500 Subject: [PATCH] fix(nvidia): Update for 575.57.08 (#5142) * fix(nvidia): Update for 575.57.08 * fix: Wha Signed-off-by: Gilver --------- Signed-off-by: Gilver --- .../dkms-nvidia/closed/dkms-nvidia.spec | 1 - .../closed/nvidia-kernel-ccflags-y.patch | 234 ------------------ .../dkms-nvidia/open/dkms-nvidia-open.spec | 1 - .../open/nvidia-kernel-ccflags-y.patch | 234 ------------------ .../nvidia/nvidia-driver/nvidia-driver.spec | 4 - .../closed/nvidia-kernel-ccflags-y.patch | 234 ------------------ .../nvidia-kmod/closed/nvidia-kmod.spec | 1 - .../open/nvidia-kernel-ccflags-y.patch | 234 ------------------ .../nvidia-kmod/open/nvidia-open-kmod.spec | 1 - 9 files changed, 944 deletions(-) delete mode 100644 anda/system/nvidia/dkms-nvidia/closed/nvidia-kernel-ccflags-y.patch delete mode 100644 anda/system/nvidia/dkms-nvidia/open/nvidia-kernel-ccflags-y.patch delete mode 100644 anda/system/nvidia/nvidia-kmod/closed/nvidia-kernel-ccflags-y.patch delete mode 100644 anda/system/nvidia/nvidia-kmod/open/nvidia-kernel-ccflags-y.patch diff --git a/anda/system/nvidia/dkms-nvidia/closed/dkms-nvidia.spec b/anda/system/nvidia/dkms-nvidia/closed/dkms-nvidia.spec index 86b8102e00..e023c62d80 100644 --- a/anda/system/nvidia/dkms-nvidia/closed/dkms-nvidia.spec +++ b/anda/system/nvidia/dkms-nvidia/closed/dkms-nvidia.spec @@ -12,7 +12,6 @@ License: NVIDIA License URL: https://www.nvidia.com/object/unix.html Source0: https://download.nvidia.com/XFree86/Linux-%{_arch}/%{version}/NVIDIA-Linux-%{_arch}-%{version}.run Source1: %{name}.conf -%dnl Patch0: nvidia-kernel-ccflags-y.patch BuildRequires: sed Provides: %{modulename}-kmod = %{?epoch:%{epoch}:}%{version} Requires: %{modulename}-kmod-common = %{?epoch:%{epoch}:}%{version} diff --git a/anda/system/nvidia/dkms-nvidia/closed/nvidia-kernel-ccflags-y.patch b/anda/system/nvidia/dkms-nvidia/closed/nvidia-kernel-ccflags-y.patch deleted file mode 100644 index 1792b26793..0000000000 --- a/anda/system/nvidia/dkms-nvidia/closed/nvidia-kernel-ccflags-y.patch +++ /dev/null @@ -1,234 +0,0 @@ -diff -Naur nvidia-kmod-575.51.02-x86_64.old/kernel/Kbuild nvidia-kmod-575.51.02-x86_64/kernel/Kbuild ---- nvidia-kmod-575.51.02-x86_64.old/kernel/Kbuild 2025-04-22 18:54:37.758155663 +0200 -+++ nvidia-kmod-575.51.02-x86_64/kernel/Kbuild 2025-04-22 18:54:45.069483044 +0200 -@@ -75,21 +75,15 @@ - $(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 += -I$(src)/common/inc --EXTRA_CFLAGS += -I$(src) --EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args --EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM --EXTRA_CFLAGS += -DNV_VERSION_STRING=\"575.51.02\" -+ccflags-y += -std=gnu17 -+ccflags-y += -I$(src)/common/inc -+ccflags-y += -I$(src) -+ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args -+ccflags-y += -D__KERNEL__ -DMODULE -DNVRM -+ccflags-y += -DNV_VERSION_STRING=\"575.51.02\" - - ifneq ($(SYSSRCHOST1X),) -- EXTRA_CFLAGS += -I$(SYSSRCHOST1X) -+ ccflags-y += -I$(SYSSRCHOST1X) - endif - - # Some Android kernels prohibit driver use of filesystem functions like -@@ -99,57 +93,57 @@ - PLATFORM_IS_ANDROID ?= 0 - - ifeq ($(PLATFORM_IS_ANDROID),1) -- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0 -+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0 - else -- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1 -+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1 - endif - --EXTRA_CFLAGS += -Wno-unused-function -+ccflags-y += -Wno-unused-function - - ifneq ($(NV_BUILD_TYPE),debug) -- EXTRA_CFLAGS += -Wuninitialized -+ ccflags-y += -Wuninitialized - endif - --EXTRA_CFLAGS += -fno-strict-aliasing -+ccflags-y += -fno-strict-aliasing - - ifeq ($(ARCH),arm64) -- EXTRA_CFLAGS += -mstrict-align -+ ccflags-y += -mstrict-align - endif - - ifeq ($(NV_BUILD_TYPE),debug) -- EXTRA_CFLAGS += -g -+ ccflags-y += -g - endif - --EXTRA_CFLAGS += -ffreestanding -+ccflags-y += -ffreestanding - - ifeq ($(ARCH),arm64) -- EXTRA_CFLAGS += -mgeneral-regs-only -march=armv8-a -- EXTRA_CFLAGS += $(call cc-option,-mno-outline-atomics,) -+ ccflags-y += -mgeneral-regs-only -march=armv8-a -+ ccflags-y += $(call cc-option,-mno-outline-atomics,) - endif - - ifeq ($(ARCH),x86_64) -- EXTRA_CFLAGS += -mno-red-zone -mcmodel=kernel -+ ccflags-y += -mno-red-zone -mcmodel=kernel - endif - - ifeq ($(ARCH),powerpc) -- EXTRA_CFLAGS += -mlittle-endian -mno-strict-align -+ ccflags-y += -mlittle-endian -mno-strict-align - endif - --EXTRA_CFLAGS += -DNV_UVM_ENABLE --EXTRA_CFLAGS += $(call cc-option,-Werror=undef,) --EXTRA_CFLAGS += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2) --EXTRA_CFLAGS += -DNV_KERNEL_INTERFACE_LAYER -+ccflags-y += -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 - - ifdef VGX_FORCE_VFIO_PCI_CORE -- EXTRA_CFLAGS += -DNV_VGPU_FORCE_VFIO_PCI_CORE -+ ccflags-y += -DNV_VGPU_FORCE_VFIO_PCI_CORE - endif - - WARNINGS_AS_ERRORS ?= -@@ -183,7 +177,7 @@ - - NV_CFLAGS_FROM_CONFTEST := $(shell $(NV_CONFTEST_CMD) build_cflags) - --NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(EXTRA_CFLAGS) -fno-pie -+NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(ccflags-y) -fno-pie - NV_CONFTEST_CFLAGS += $(call cc-disable-warning,pointer-sign) - NV_CONFTEST_CFLAGS += $(call cc-option,-fshort-wchar,) - NV_CONFTEST_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types,) -diff -Naur nvidia-kmod-575.51.02-x86_64.old/kernel-open/Kbuild nvidia-kmod-575.51.02-x86_64/kernel-open/Kbuild ---- nvidia-kmod-575.51.02-x86_64.old/kernel-open/Kbuild 2025-04-22 18:54:37.828156191 +0200 -+++ nvidia-kmod-575.51.02-x86_64/kernel-open/Kbuild 2025-04-22 18:54:45.069786396 +0200 -@@ -75,21 +75,15 @@ - $(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 += -I$(src)/common/inc --EXTRA_CFLAGS += -I$(src) --EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args --EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM --EXTRA_CFLAGS += -DNV_VERSION_STRING=\"575.51.02\" -+ccflags-y += -std=gnu17 -+ccflags-y += -I$(src)/common/inc -+ccflags-y += -I$(src) -+ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args -+ccflags-y += -D__KERNEL__ -DMODULE -DNVRM -+ccflags-y += -DNV_VERSION_STRING=\"575.51.02\" - - ifneq ($(SYSSRCHOST1X),) -- EXTRA_CFLAGS += -I$(SYSSRCHOST1X) -+ ccflags-y += -I$(SYSSRCHOST1X) - endif - - # Some Android kernels prohibit driver use of filesystem functions like -@@ -99,57 +93,57 @@ - PLATFORM_IS_ANDROID ?= 0 - - ifeq ($(PLATFORM_IS_ANDROID),1) -- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0 -+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0 - else -- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1 -+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1 - endif - --EXTRA_CFLAGS += -Wno-unused-function -+ccflags-y += -Wno-unused-function - - ifneq ($(NV_BUILD_TYPE),debug) -- EXTRA_CFLAGS += -Wuninitialized -+ ccflags-y += -Wuninitialized - endif - --EXTRA_CFLAGS += -fno-strict-aliasing -+ccflags-y += -fno-strict-aliasing - - ifeq ($(ARCH),arm64) -- EXTRA_CFLAGS += -mstrict-align -+ ccflags-y += -mstrict-align - endif - - ifeq ($(NV_BUILD_TYPE),debug) -- EXTRA_CFLAGS += -g -+ ccflags-y += -g - endif - --EXTRA_CFLAGS += -ffreestanding -+ccflags-y += -ffreestanding - - ifeq ($(ARCH),arm64) -- EXTRA_CFLAGS += -mgeneral-regs-only -march=armv8-a -- EXTRA_CFLAGS += $(call cc-option,-mno-outline-atomics,) -+ ccflags-y += -mgeneral-regs-only -march=armv8-a -+ ccflags-y += $(call cc-option,-mno-outline-atomics,) - endif - - ifeq ($(ARCH),x86_64) -- EXTRA_CFLAGS += -mno-red-zone -mcmodel=kernel -+ ccflags-y += -mno-red-zone -mcmodel=kernel - endif - - ifeq ($(ARCH),powerpc) -- EXTRA_CFLAGS += -mlittle-endian -mno-strict-align -+ ccflags-y += -mlittle-endian -mno-strict-align - endif - --EXTRA_CFLAGS += -DNV_UVM_ENABLE --EXTRA_CFLAGS += $(call cc-option,-Werror=undef,) --EXTRA_CFLAGS += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2) --EXTRA_CFLAGS += -DNV_KERNEL_INTERFACE_LAYER -+ccflags-y += -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 - - ifdef VGX_FORCE_VFIO_PCI_CORE -- EXTRA_CFLAGS += -DNV_VGPU_FORCE_VFIO_PCI_CORE -+ ccflags-y += -DNV_VGPU_FORCE_VFIO_PCI_CORE - endif - - WARNINGS_AS_ERRORS ?= -@@ -183,7 +177,7 @@ - - NV_CFLAGS_FROM_CONFTEST := $(shell $(NV_CONFTEST_CMD) build_cflags) - --NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(EXTRA_CFLAGS) -fno-pie -+NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(ccflags-y) -fno-pie - NV_CONFTEST_CFLAGS += $(call cc-disable-warning,pointer-sign) - NV_CONFTEST_CFLAGS += $(call cc-option,-fshort-wchar,) - NV_CONFTEST_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types,) diff --git a/anda/system/nvidia/dkms-nvidia/open/dkms-nvidia-open.spec b/anda/system/nvidia/dkms-nvidia/open/dkms-nvidia-open.spec index a5481c1db8..941aab8dc8 100644 --- a/anda/system/nvidia/dkms-nvidia/open/dkms-nvidia-open.spec +++ b/anda/system/nvidia/dkms-nvidia/open/dkms-nvidia-open.spec @@ -12,7 +12,6 @@ License: NVIDIA License URL: https://www.nvidia.com/object/unix.html Source0: https://download.nvidia.com/XFree86/Linux-%{_arch}/%{version}/NVIDIA-Linux-%{_arch}-%{version}.run Source1: %{name}.conf -%dnl Patch0: nvidia-kernel-ccflags-y.patch BuildRequires: sed Provides: %{modulename}-open-kmod = %{?epoch:%{epoch}:}%{version} Requires: %{modulename}-kmod-common = %{?epoch:%{epoch}:}%{version} diff --git a/anda/system/nvidia/dkms-nvidia/open/nvidia-kernel-ccflags-y.patch b/anda/system/nvidia/dkms-nvidia/open/nvidia-kernel-ccflags-y.patch deleted file mode 100644 index 1792b26793..0000000000 --- a/anda/system/nvidia/dkms-nvidia/open/nvidia-kernel-ccflags-y.patch +++ /dev/null @@ -1,234 +0,0 @@ -diff -Naur nvidia-kmod-575.51.02-x86_64.old/kernel/Kbuild nvidia-kmod-575.51.02-x86_64/kernel/Kbuild ---- nvidia-kmod-575.51.02-x86_64.old/kernel/Kbuild 2025-04-22 18:54:37.758155663 +0200 -+++ nvidia-kmod-575.51.02-x86_64/kernel/Kbuild 2025-04-22 18:54:45.069483044 +0200 -@@ -75,21 +75,15 @@ - $(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 += -I$(src)/common/inc --EXTRA_CFLAGS += -I$(src) --EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args --EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM --EXTRA_CFLAGS += -DNV_VERSION_STRING=\"575.51.02\" -+ccflags-y += -std=gnu17 -+ccflags-y += -I$(src)/common/inc -+ccflags-y += -I$(src) -+ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args -+ccflags-y += -D__KERNEL__ -DMODULE -DNVRM -+ccflags-y += -DNV_VERSION_STRING=\"575.51.02\" - - ifneq ($(SYSSRCHOST1X),) -- EXTRA_CFLAGS += -I$(SYSSRCHOST1X) -+ ccflags-y += -I$(SYSSRCHOST1X) - endif - - # Some Android kernels prohibit driver use of filesystem functions like -@@ -99,57 +93,57 @@ - PLATFORM_IS_ANDROID ?= 0 - - ifeq ($(PLATFORM_IS_ANDROID),1) -- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0 -+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0 - else -- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1 -+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1 - endif - --EXTRA_CFLAGS += -Wno-unused-function -+ccflags-y += -Wno-unused-function - - ifneq ($(NV_BUILD_TYPE),debug) -- EXTRA_CFLAGS += -Wuninitialized -+ ccflags-y += -Wuninitialized - endif - --EXTRA_CFLAGS += -fno-strict-aliasing -+ccflags-y += -fno-strict-aliasing - - ifeq ($(ARCH),arm64) -- EXTRA_CFLAGS += -mstrict-align -+ ccflags-y += -mstrict-align - endif - - ifeq ($(NV_BUILD_TYPE),debug) -- EXTRA_CFLAGS += -g -+ ccflags-y += -g - endif - --EXTRA_CFLAGS += -ffreestanding -+ccflags-y += -ffreestanding - - ifeq ($(ARCH),arm64) -- EXTRA_CFLAGS += -mgeneral-regs-only -march=armv8-a -- EXTRA_CFLAGS += $(call cc-option,-mno-outline-atomics,) -+ ccflags-y += -mgeneral-regs-only -march=armv8-a -+ ccflags-y += $(call cc-option,-mno-outline-atomics,) - endif - - ifeq ($(ARCH),x86_64) -- EXTRA_CFLAGS += -mno-red-zone -mcmodel=kernel -+ ccflags-y += -mno-red-zone -mcmodel=kernel - endif - - ifeq ($(ARCH),powerpc) -- EXTRA_CFLAGS += -mlittle-endian -mno-strict-align -+ ccflags-y += -mlittle-endian -mno-strict-align - endif - --EXTRA_CFLAGS += -DNV_UVM_ENABLE --EXTRA_CFLAGS += $(call cc-option,-Werror=undef,) --EXTRA_CFLAGS += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2) --EXTRA_CFLAGS += -DNV_KERNEL_INTERFACE_LAYER -+ccflags-y += -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 - - ifdef VGX_FORCE_VFIO_PCI_CORE -- EXTRA_CFLAGS += -DNV_VGPU_FORCE_VFIO_PCI_CORE -+ ccflags-y += -DNV_VGPU_FORCE_VFIO_PCI_CORE - endif - - WARNINGS_AS_ERRORS ?= -@@ -183,7 +177,7 @@ - - NV_CFLAGS_FROM_CONFTEST := $(shell $(NV_CONFTEST_CMD) build_cflags) - --NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(EXTRA_CFLAGS) -fno-pie -+NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(ccflags-y) -fno-pie - NV_CONFTEST_CFLAGS += $(call cc-disable-warning,pointer-sign) - NV_CONFTEST_CFLAGS += $(call cc-option,-fshort-wchar,) - NV_CONFTEST_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types,) -diff -Naur nvidia-kmod-575.51.02-x86_64.old/kernel-open/Kbuild nvidia-kmod-575.51.02-x86_64/kernel-open/Kbuild ---- nvidia-kmod-575.51.02-x86_64.old/kernel-open/Kbuild 2025-04-22 18:54:37.828156191 +0200 -+++ nvidia-kmod-575.51.02-x86_64/kernel-open/Kbuild 2025-04-22 18:54:45.069786396 +0200 -@@ -75,21 +75,15 @@ - $(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 += -I$(src)/common/inc --EXTRA_CFLAGS += -I$(src) --EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args --EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM --EXTRA_CFLAGS += -DNV_VERSION_STRING=\"575.51.02\" -+ccflags-y += -std=gnu17 -+ccflags-y += -I$(src)/common/inc -+ccflags-y += -I$(src) -+ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args -+ccflags-y += -D__KERNEL__ -DMODULE -DNVRM -+ccflags-y += -DNV_VERSION_STRING=\"575.51.02\" - - ifneq ($(SYSSRCHOST1X),) -- EXTRA_CFLAGS += -I$(SYSSRCHOST1X) -+ ccflags-y += -I$(SYSSRCHOST1X) - endif - - # Some Android kernels prohibit driver use of filesystem functions like -@@ -99,57 +93,57 @@ - PLATFORM_IS_ANDROID ?= 0 - - ifeq ($(PLATFORM_IS_ANDROID),1) -- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0 -+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0 - else -- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1 -+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1 - endif - --EXTRA_CFLAGS += -Wno-unused-function -+ccflags-y += -Wno-unused-function - - ifneq ($(NV_BUILD_TYPE),debug) -- EXTRA_CFLAGS += -Wuninitialized -+ ccflags-y += -Wuninitialized - endif - --EXTRA_CFLAGS += -fno-strict-aliasing -+ccflags-y += -fno-strict-aliasing - - ifeq ($(ARCH),arm64) -- EXTRA_CFLAGS += -mstrict-align -+ ccflags-y += -mstrict-align - endif - - ifeq ($(NV_BUILD_TYPE),debug) -- EXTRA_CFLAGS += -g -+ ccflags-y += -g - endif - --EXTRA_CFLAGS += -ffreestanding -+ccflags-y += -ffreestanding - - ifeq ($(ARCH),arm64) -- EXTRA_CFLAGS += -mgeneral-regs-only -march=armv8-a -- EXTRA_CFLAGS += $(call cc-option,-mno-outline-atomics,) -+ ccflags-y += -mgeneral-regs-only -march=armv8-a -+ ccflags-y += $(call cc-option,-mno-outline-atomics,) - endif - - ifeq ($(ARCH),x86_64) -- EXTRA_CFLAGS += -mno-red-zone -mcmodel=kernel -+ ccflags-y += -mno-red-zone -mcmodel=kernel - endif - - ifeq ($(ARCH),powerpc) -- EXTRA_CFLAGS += -mlittle-endian -mno-strict-align -+ ccflags-y += -mlittle-endian -mno-strict-align - endif - --EXTRA_CFLAGS += -DNV_UVM_ENABLE --EXTRA_CFLAGS += $(call cc-option,-Werror=undef,) --EXTRA_CFLAGS += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2) --EXTRA_CFLAGS += -DNV_KERNEL_INTERFACE_LAYER -+ccflags-y += -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 - - ifdef VGX_FORCE_VFIO_PCI_CORE -- EXTRA_CFLAGS += -DNV_VGPU_FORCE_VFIO_PCI_CORE -+ ccflags-y += -DNV_VGPU_FORCE_VFIO_PCI_CORE - endif - - WARNINGS_AS_ERRORS ?= -@@ -183,7 +177,7 @@ - - NV_CFLAGS_FROM_CONFTEST := $(shell $(NV_CONFTEST_CMD) build_cflags) - --NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(EXTRA_CFLAGS) -fno-pie -+NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(ccflags-y) -fno-pie - NV_CONFTEST_CFLAGS += $(call cc-disable-warning,pointer-sign) - NV_CONFTEST_CFLAGS += $(call cc-option,-fshort-wchar,) - NV_CONFTEST_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types,) diff --git a/anda/system/nvidia/nvidia-driver/nvidia-driver.spec b/anda/system/nvidia/nvidia-driver/nvidia-driver.spec index 6985f9c7d7..0ea99ae0c1 100644 --- a/anda/system/nvidia/nvidia-driver/nvidia-driver.spec +++ b/anda/system/nvidia/nvidia-driver/nvidia-driver.spec @@ -483,13 +483,9 @@ appstream-util validate --nonet %{buildroot}%{_metainfodir}/com.nvidia.driver.me %if v"%{version}" > v"570.144" %{_libdir}/libnvidia-nvvm70.so.4 %endif -%if v"%{version}" <= v"570.144" -%ifnarch aarch64 %{_libdir}/libnvidia-sandboxutils.so.1 %{_libdir}/libnvidia-sandboxutils.so.%{version} %endif -%endif -%endif %ifarch x86_64 %if 0%{?rhel} == 8 %{_libdir}/libnvidia-pkcs11.so.%{version} diff --git a/anda/system/nvidia/nvidia-kmod/closed/nvidia-kernel-ccflags-y.patch b/anda/system/nvidia/nvidia-kmod/closed/nvidia-kernel-ccflags-y.patch deleted file mode 100644 index 1792b26793..0000000000 --- a/anda/system/nvidia/nvidia-kmod/closed/nvidia-kernel-ccflags-y.patch +++ /dev/null @@ -1,234 +0,0 @@ -diff -Naur nvidia-kmod-575.51.02-x86_64.old/kernel/Kbuild nvidia-kmod-575.51.02-x86_64/kernel/Kbuild ---- nvidia-kmod-575.51.02-x86_64.old/kernel/Kbuild 2025-04-22 18:54:37.758155663 +0200 -+++ nvidia-kmod-575.51.02-x86_64/kernel/Kbuild 2025-04-22 18:54:45.069483044 +0200 -@@ -75,21 +75,15 @@ - $(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 += -I$(src)/common/inc --EXTRA_CFLAGS += -I$(src) --EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args --EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM --EXTRA_CFLAGS += -DNV_VERSION_STRING=\"575.51.02\" -+ccflags-y += -std=gnu17 -+ccflags-y += -I$(src)/common/inc -+ccflags-y += -I$(src) -+ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args -+ccflags-y += -D__KERNEL__ -DMODULE -DNVRM -+ccflags-y += -DNV_VERSION_STRING=\"575.51.02\" - - ifneq ($(SYSSRCHOST1X),) -- EXTRA_CFLAGS += -I$(SYSSRCHOST1X) -+ ccflags-y += -I$(SYSSRCHOST1X) - endif - - # Some Android kernels prohibit driver use of filesystem functions like -@@ -99,57 +93,57 @@ - PLATFORM_IS_ANDROID ?= 0 - - ifeq ($(PLATFORM_IS_ANDROID),1) -- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0 -+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0 - else -- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1 -+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1 - endif - --EXTRA_CFLAGS += -Wno-unused-function -+ccflags-y += -Wno-unused-function - - ifneq ($(NV_BUILD_TYPE),debug) -- EXTRA_CFLAGS += -Wuninitialized -+ ccflags-y += -Wuninitialized - endif - --EXTRA_CFLAGS += -fno-strict-aliasing -+ccflags-y += -fno-strict-aliasing - - ifeq ($(ARCH),arm64) -- EXTRA_CFLAGS += -mstrict-align -+ ccflags-y += -mstrict-align - endif - - ifeq ($(NV_BUILD_TYPE),debug) -- EXTRA_CFLAGS += -g -+ ccflags-y += -g - endif - --EXTRA_CFLAGS += -ffreestanding -+ccflags-y += -ffreestanding - - ifeq ($(ARCH),arm64) -- EXTRA_CFLAGS += -mgeneral-regs-only -march=armv8-a -- EXTRA_CFLAGS += $(call cc-option,-mno-outline-atomics,) -+ ccflags-y += -mgeneral-regs-only -march=armv8-a -+ ccflags-y += $(call cc-option,-mno-outline-atomics,) - endif - - ifeq ($(ARCH),x86_64) -- EXTRA_CFLAGS += -mno-red-zone -mcmodel=kernel -+ ccflags-y += -mno-red-zone -mcmodel=kernel - endif - - ifeq ($(ARCH),powerpc) -- EXTRA_CFLAGS += -mlittle-endian -mno-strict-align -+ ccflags-y += -mlittle-endian -mno-strict-align - endif - --EXTRA_CFLAGS += -DNV_UVM_ENABLE --EXTRA_CFLAGS += $(call cc-option,-Werror=undef,) --EXTRA_CFLAGS += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2) --EXTRA_CFLAGS += -DNV_KERNEL_INTERFACE_LAYER -+ccflags-y += -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 - - ifdef VGX_FORCE_VFIO_PCI_CORE -- EXTRA_CFLAGS += -DNV_VGPU_FORCE_VFIO_PCI_CORE -+ ccflags-y += -DNV_VGPU_FORCE_VFIO_PCI_CORE - endif - - WARNINGS_AS_ERRORS ?= -@@ -183,7 +177,7 @@ - - NV_CFLAGS_FROM_CONFTEST := $(shell $(NV_CONFTEST_CMD) build_cflags) - --NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(EXTRA_CFLAGS) -fno-pie -+NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(ccflags-y) -fno-pie - NV_CONFTEST_CFLAGS += $(call cc-disable-warning,pointer-sign) - NV_CONFTEST_CFLAGS += $(call cc-option,-fshort-wchar,) - NV_CONFTEST_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types,) -diff -Naur nvidia-kmod-575.51.02-x86_64.old/kernel-open/Kbuild nvidia-kmod-575.51.02-x86_64/kernel-open/Kbuild ---- nvidia-kmod-575.51.02-x86_64.old/kernel-open/Kbuild 2025-04-22 18:54:37.828156191 +0200 -+++ nvidia-kmod-575.51.02-x86_64/kernel-open/Kbuild 2025-04-22 18:54:45.069786396 +0200 -@@ -75,21 +75,15 @@ - $(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 += -I$(src)/common/inc --EXTRA_CFLAGS += -I$(src) --EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args --EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM --EXTRA_CFLAGS += -DNV_VERSION_STRING=\"575.51.02\" -+ccflags-y += -std=gnu17 -+ccflags-y += -I$(src)/common/inc -+ccflags-y += -I$(src) -+ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args -+ccflags-y += -D__KERNEL__ -DMODULE -DNVRM -+ccflags-y += -DNV_VERSION_STRING=\"575.51.02\" - - ifneq ($(SYSSRCHOST1X),) -- EXTRA_CFLAGS += -I$(SYSSRCHOST1X) -+ ccflags-y += -I$(SYSSRCHOST1X) - endif - - # Some Android kernels prohibit driver use of filesystem functions like -@@ -99,57 +93,57 @@ - PLATFORM_IS_ANDROID ?= 0 - - ifeq ($(PLATFORM_IS_ANDROID),1) -- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0 -+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0 - else -- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1 -+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1 - endif - --EXTRA_CFLAGS += -Wno-unused-function -+ccflags-y += -Wno-unused-function - - ifneq ($(NV_BUILD_TYPE),debug) -- EXTRA_CFLAGS += -Wuninitialized -+ ccflags-y += -Wuninitialized - endif - --EXTRA_CFLAGS += -fno-strict-aliasing -+ccflags-y += -fno-strict-aliasing - - ifeq ($(ARCH),arm64) -- EXTRA_CFLAGS += -mstrict-align -+ ccflags-y += -mstrict-align - endif - - ifeq ($(NV_BUILD_TYPE),debug) -- EXTRA_CFLAGS += -g -+ ccflags-y += -g - endif - --EXTRA_CFLAGS += -ffreestanding -+ccflags-y += -ffreestanding - - ifeq ($(ARCH),arm64) -- EXTRA_CFLAGS += -mgeneral-regs-only -march=armv8-a -- EXTRA_CFLAGS += $(call cc-option,-mno-outline-atomics,) -+ ccflags-y += -mgeneral-regs-only -march=armv8-a -+ ccflags-y += $(call cc-option,-mno-outline-atomics,) - endif - - ifeq ($(ARCH),x86_64) -- EXTRA_CFLAGS += -mno-red-zone -mcmodel=kernel -+ ccflags-y += -mno-red-zone -mcmodel=kernel - endif - - ifeq ($(ARCH),powerpc) -- EXTRA_CFLAGS += -mlittle-endian -mno-strict-align -+ ccflags-y += -mlittle-endian -mno-strict-align - endif - --EXTRA_CFLAGS += -DNV_UVM_ENABLE --EXTRA_CFLAGS += $(call cc-option,-Werror=undef,) --EXTRA_CFLAGS += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2) --EXTRA_CFLAGS += -DNV_KERNEL_INTERFACE_LAYER -+ccflags-y += -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 - - ifdef VGX_FORCE_VFIO_PCI_CORE -- EXTRA_CFLAGS += -DNV_VGPU_FORCE_VFIO_PCI_CORE -+ ccflags-y += -DNV_VGPU_FORCE_VFIO_PCI_CORE - endif - - WARNINGS_AS_ERRORS ?= -@@ -183,7 +177,7 @@ - - NV_CFLAGS_FROM_CONFTEST := $(shell $(NV_CONFTEST_CMD) build_cflags) - --NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(EXTRA_CFLAGS) -fno-pie -+NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(ccflags-y) -fno-pie - NV_CONFTEST_CFLAGS += $(call cc-disable-warning,pointer-sign) - NV_CONFTEST_CFLAGS += $(call cc-option,-fshort-wchar,) - NV_CONFTEST_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types,) diff --git a/anda/system/nvidia/nvidia-kmod/closed/nvidia-kmod.spec b/anda/system/nvidia/nvidia-kmod/closed/nvidia-kmod.spec index 052aed9f0c..3bdc35a6d9 100644 --- a/anda/system/nvidia/nvidia-kmod/closed/nvidia-kmod.spec +++ b/anda/system/nvidia/nvidia-kmod/closed/nvidia-kmod.spec @@ -13,7 +13,6 @@ URL: http://www.nvidia.com/object/unix.html ExclusiveArch: x86_64 aarch64 Source0: http://download.nvidia.com/XFree86/Linux-%{_arch}/%{version}/NVIDIA-Linux-%{_arch}-%{version}.run -%dnl Patch0: nvidia-kernel-ccflags-y.patch Requires: nvidia-kmod-common = %{?epoch:%{epoch}:}%{version} Requires: akmods diff --git a/anda/system/nvidia/nvidia-kmod/open/nvidia-kernel-ccflags-y.patch b/anda/system/nvidia/nvidia-kmod/open/nvidia-kernel-ccflags-y.patch deleted file mode 100644 index 1792b26793..0000000000 --- a/anda/system/nvidia/nvidia-kmod/open/nvidia-kernel-ccflags-y.patch +++ /dev/null @@ -1,234 +0,0 @@ -diff -Naur nvidia-kmod-575.51.02-x86_64.old/kernel/Kbuild nvidia-kmod-575.51.02-x86_64/kernel/Kbuild ---- nvidia-kmod-575.51.02-x86_64.old/kernel/Kbuild 2025-04-22 18:54:37.758155663 +0200 -+++ nvidia-kmod-575.51.02-x86_64/kernel/Kbuild 2025-04-22 18:54:45.069483044 +0200 -@@ -75,21 +75,15 @@ - $(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 += -I$(src)/common/inc --EXTRA_CFLAGS += -I$(src) --EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args --EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM --EXTRA_CFLAGS += -DNV_VERSION_STRING=\"575.51.02\" -+ccflags-y += -std=gnu17 -+ccflags-y += -I$(src)/common/inc -+ccflags-y += -I$(src) -+ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args -+ccflags-y += -D__KERNEL__ -DMODULE -DNVRM -+ccflags-y += -DNV_VERSION_STRING=\"575.51.02\" - - ifneq ($(SYSSRCHOST1X),) -- EXTRA_CFLAGS += -I$(SYSSRCHOST1X) -+ ccflags-y += -I$(SYSSRCHOST1X) - endif - - # Some Android kernels prohibit driver use of filesystem functions like -@@ -99,57 +93,57 @@ - PLATFORM_IS_ANDROID ?= 0 - - ifeq ($(PLATFORM_IS_ANDROID),1) -- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0 -+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0 - else -- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1 -+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1 - endif - --EXTRA_CFLAGS += -Wno-unused-function -+ccflags-y += -Wno-unused-function - - ifneq ($(NV_BUILD_TYPE),debug) -- EXTRA_CFLAGS += -Wuninitialized -+ ccflags-y += -Wuninitialized - endif - --EXTRA_CFLAGS += -fno-strict-aliasing -+ccflags-y += -fno-strict-aliasing - - ifeq ($(ARCH),arm64) -- EXTRA_CFLAGS += -mstrict-align -+ ccflags-y += -mstrict-align - endif - - ifeq ($(NV_BUILD_TYPE),debug) -- EXTRA_CFLAGS += -g -+ ccflags-y += -g - endif - --EXTRA_CFLAGS += -ffreestanding -+ccflags-y += -ffreestanding - - ifeq ($(ARCH),arm64) -- EXTRA_CFLAGS += -mgeneral-regs-only -march=armv8-a -- EXTRA_CFLAGS += $(call cc-option,-mno-outline-atomics,) -+ ccflags-y += -mgeneral-regs-only -march=armv8-a -+ ccflags-y += $(call cc-option,-mno-outline-atomics,) - endif - - ifeq ($(ARCH),x86_64) -- EXTRA_CFLAGS += -mno-red-zone -mcmodel=kernel -+ ccflags-y += -mno-red-zone -mcmodel=kernel - endif - - ifeq ($(ARCH),powerpc) -- EXTRA_CFLAGS += -mlittle-endian -mno-strict-align -+ ccflags-y += -mlittle-endian -mno-strict-align - endif - --EXTRA_CFLAGS += -DNV_UVM_ENABLE --EXTRA_CFLAGS += $(call cc-option,-Werror=undef,) --EXTRA_CFLAGS += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2) --EXTRA_CFLAGS += -DNV_KERNEL_INTERFACE_LAYER -+ccflags-y += -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 - - ifdef VGX_FORCE_VFIO_PCI_CORE -- EXTRA_CFLAGS += -DNV_VGPU_FORCE_VFIO_PCI_CORE -+ ccflags-y += -DNV_VGPU_FORCE_VFIO_PCI_CORE - endif - - WARNINGS_AS_ERRORS ?= -@@ -183,7 +177,7 @@ - - NV_CFLAGS_FROM_CONFTEST := $(shell $(NV_CONFTEST_CMD) build_cflags) - --NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(EXTRA_CFLAGS) -fno-pie -+NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(ccflags-y) -fno-pie - NV_CONFTEST_CFLAGS += $(call cc-disable-warning,pointer-sign) - NV_CONFTEST_CFLAGS += $(call cc-option,-fshort-wchar,) - NV_CONFTEST_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types,) -diff -Naur nvidia-kmod-575.51.02-x86_64.old/kernel-open/Kbuild nvidia-kmod-575.51.02-x86_64/kernel-open/Kbuild ---- nvidia-kmod-575.51.02-x86_64.old/kernel-open/Kbuild 2025-04-22 18:54:37.828156191 +0200 -+++ nvidia-kmod-575.51.02-x86_64/kernel-open/Kbuild 2025-04-22 18:54:45.069786396 +0200 -@@ -75,21 +75,15 @@ - $(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 += -I$(src)/common/inc --EXTRA_CFLAGS += -I$(src) --EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args --EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM --EXTRA_CFLAGS += -DNV_VERSION_STRING=\"575.51.02\" -+ccflags-y += -std=gnu17 -+ccflags-y += -I$(src)/common/inc -+ccflags-y += -I$(src) -+ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args -+ccflags-y += -D__KERNEL__ -DMODULE -DNVRM -+ccflags-y += -DNV_VERSION_STRING=\"575.51.02\" - - ifneq ($(SYSSRCHOST1X),) -- EXTRA_CFLAGS += -I$(SYSSRCHOST1X) -+ ccflags-y += -I$(SYSSRCHOST1X) - endif - - # Some Android kernels prohibit driver use of filesystem functions like -@@ -99,57 +93,57 @@ - PLATFORM_IS_ANDROID ?= 0 - - ifeq ($(PLATFORM_IS_ANDROID),1) -- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0 -+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0 - else -- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1 -+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1 - endif - --EXTRA_CFLAGS += -Wno-unused-function -+ccflags-y += -Wno-unused-function - - ifneq ($(NV_BUILD_TYPE),debug) -- EXTRA_CFLAGS += -Wuninitialized -+ ccflags-y += -Wuninitialized - endif - --EXTRA_CFLAGS += -fno-strict-aliasing -+ccflags-y += -fno-strict-aliasing - - ifeq ($(ARCH),arm64) -- EXTRA_CFLAGS += -mstrict-align -+ ccflags-y += -mstrict-align - endif - - ifeq ($(NV_BUILD_TYPE),debug) -- EXTRA_CFLAGS += -g -+ ccflags-y += -g - endif - --EXTRA_CFLAGS += -ffreestanding -+ccflags-y += -ffreestanding - - ifeq ($(ARCH),arm64) -- EXTRA_CFLAGS += -mgeneral-regs-only -march=armv8-a -- EXTRA_CFLAGS += $(call cc-option,-mno-outline-atomics,) -+ ccflags-y += -mgeneral-regs-only -march=armv8-a -+ ccflags-y += $(call cc-option,-mno-outline-atomics,) - endif - - ifeq ($(ARCH),x86_64) -- EXTRA_CFLAGS += -mno-red-zone -mcmodel=kernel -+ ccflags-y += -mno-red-zone -mcmodel=kernel - endif - - ifeq ($(ARCH),powerpc) -- EXTRA_CFLAGS += -mlittle-endian -mno-strict-align -+ ccflags-y += -mlittle-endian -mno-strict-align - endif - --EXTRA_CFLAGS += -DNV_UVM_ENABLE --EXTRA_CFLAGS += $(call cc-option,-Werror=undef,) --EXTRA_CFLAGS += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2) --EXTRA_CFLAGS += -DNV_KERNEL_INTERFACE_LAYER -+ccflags-y += -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 - - ifdef VGX_FORCE_VFIO_PCI_CORE -- EXTRA_CFLAGS += -DNV_VGPU_FORCE_VFIO_PCI_CORE -+ ccflags-y += -DNV_VGPU_FORCE_VFIO_PCI_CORE - endif - - WARNINGS_AS_ERRORS ?= -@@ -183,7 +177,7 @@ - - NV_CFLAGS_FROM_CONFTEST := $(shell $(NV_CONFTEST_CMD) build_cflags) - --NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(EXTRA_CFLAGS) -fno-pie -+NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(ccflags-y) -fno-pie - NV_CONFTEST_CFLAGS += $(call cc-disable-warning,pointer-sign) - NV_CONFTEST_CFLAGS += $(call cc-option,-fshort-wchar,) - NV_CONFTEST_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types,) diff --git a/anda/system/nvidia/nvidia-kmod/open/nvidia-open-kmod.spec b/anda/system/nvidia/nvidia-kmod/open/nvidia-open-kmod.spec index c740ddac8d..aa7441da11 100644 --- a/anda/system/nvidia/nvidia-kmod/open/nvidia-open-kmod.spec +++ b/anda/system/nvidia/nvidia-kmod/open/nvidia-open-kmod.spec @@ -13,7 +13,6 @@ URL: http://www.nvidia.com/object/unix.html ExclusiveArch: x86_64 aarch64 Source0: http://download.nvidia.com/XFree86/Linux-%{_arch}/%{version}/NVIDIA-Linux-%{_arch}-%{version}.run -%dnl Patch0: nvidia-kernel-ccflags-y.patch Requires: nvidia-kmod-common = %{?epoch:%{epoch}:}%{version} Requires: akmods