{"id":3324,"date":"2025-05-01T16:28:34","date_gmt":"2025-05-01T23:28:34","guid":{"rendered":"https:\/\/rglinuxtech.com\/?p=3324"},"modified":"2025-05-01T16:28:34","modified_gmt":"2025-05-01T23:28:34","slug":"nvidia-simple-workaround-for-gcc15-in-fedora-42","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=3324","title":{"rendered":"NVIDIA &#8211; Simple Workaround for GCC15 in Fedora 42.."},"content":{"rendered":"<p>Now that <strong><em>Fedora 42<\/em><\/strong> is out, including GCC 15 (currently GCC 15.1.1-1) there is a simple workaround for compilation, thanks to <span class=\"p-name vcard-fullname d-block overflow-hidden\"><strong><em>Rudi Heitbaum<\/em><\/strong>.\u00a0\u00a0\u00a0 The change is documented at <a href=\"https:\/\/github.com\/NVIDIA\/open-gpu-kernel-modules\/pull\/841\/commits\/448b236d893170edc8fc4dff029044948516352b\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/NVIDIA\/open-gpu-kernel-modules\/pull\/841\/commits\/448b236d893170edc8fc4dff029044948516352b<\/a>, 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..<\/span><\/p>\n<p>For <span style=\"font-family: Courier New, Courier, monospace;\"><strong>NVIDIA-Linux-x86_64-570.144\/kernel\/Kbuild<\/strong><\/span>, add the following line:<\/p>\n<p><span style=\"font-family: Courier New, Courier, monospace;\"><strong><span class=\"blob-code-inner blob-code-marker \" data-code-marker=\"+\"><span class=\"pl-smi\">EXTRA_CFLAGS<\/span> += -std=gnu17<\/span><\/strong><\/span><\/p>\n<p>or, for Kernel 6.15 and later:<\/p>\n<p><span style=\"font-family: Courier New, Courier, monospace;\"><strong><span class=\"blob-code-inner blob-code-marker \" data-code-marker=\"+\"><span class=\"pl-smi\">ccflags-y<\/span> += -std=gnu17<\/span><\/strong><\/span><\/p>\n<p>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..)..\u00a0\u00a0 It should be mentioned that the &#8216;ccflags-y&#8217; option will work OK with Kernel 6.14..<\/p>\n<p><strong><em>Robert Gadsdon.\u00a0\u00a0\u00a0 May 1st 2025.<\/em><\/strong><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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.\u00a0\u00a0\u00a0 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 <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=3324\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5,11,14,15,18,19],"tags":[2741,121,2717,2718,277],"class_list":["post-3324","post","type-post","status-publish","format-standard","hentry","category-compilation","category-hacks","category-kernel","category-linux-2","category-nvidia","category-opinion","tag-stdgnu17","tag-compile-fix","tag-fedora-42","tag-gcc-15","tag-nvidia-2"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/3324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3324"}],"version-history":[{"count":4,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/3324\/revisions"}],"predecessor-version":[{"id":3328,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/3324\/revisions\/3328"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}