NVIDIA – Simple Workaround for GCC15 in Fedora 42..
Now that Fedora 42 is out, including GCC 15 (currently GCC 15.1.1-1) there is a simple workaround for compilation, thanks to Rudi Heitbaum. The change is documented at https://github.com/NVIDIA/open-gpu-kernel-modules/pull/841/commits/448b236d893170edc8fc4dff029044948516352b, and must be seen as a workaround, not a fix, as it effectively removes some of the warnings/errors flagged by the latest GCC version..
For NVIDIA-Linux-x86_64-570.144/kernel/Kbuild, add the following line:
EXTRA_CFLAGS += -std=gnu17
or, for Kernel 6.15 and later:
ccflags-y += -std=gnu17
I have tested this with Fedora 42/GCC 15 with NVIDIA-Linux-x86_64-570.144 and Kernel 6.14.4, and patched NVIDIA-Linux-x86_64-570.144 with 6.15-rc4 (all kernels compiled..).. It should be mentioned that the ‘ccflags-y’ option will work OK with Kernel 6.14..
Robert Gadsdon. May 1st 2025.
Comments
NVIDIA – Simple Workaround for GCC15 in Fedora 42.. — No Comments