summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSoftExpert2024-05-13 18:15:53 +0200
committerSoftExpert2024-05-13 18:15:53 +0200
commit586fc9e058e952baea36bf6b9f9f727827865c6e (patch)
tree2869ea75bafc4558a2553fd6849cf6b4f60a6233
parent99e02d84eb68e76a049f074f1494eb55be2c4e26 (diff)
downloadaur-586fc9e058e952baea36bf6b9f9f727827865c6e.tar.gz
added patches for GCC14 compatibility
-rw-r--r--.SRCINFO8
-rw-r--r--0001-Fix-conftest-to-ignore-implicit-function-declaration.patch27
-rw-r--r--0002-Fix-conftest-to-use-a-short-wchar_t.patch25
-rw-r--r--0003-Fix-conftest-to-use-nv_drm_gem_vmap-which-has-the-se.patch31
-rw-r--r--PKGBUILD42
5 files changed, 116 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ae4199a749cb..d1882d2a65a3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = nvidia-470xx-utils
pkgver = 470.239.06
- pkgrel = 1
+ pkgrel = 2
url = http://www.nvidia.com/
arch = x86_64
license = custom
@@ -13,6 +13,9 @@ pkgbase = nvidia-470xx-utils
source = kernel-6.5.patch
source = kernel-6.6.patch
source = kernel-6.1.76_6.6.15_6.7.3.patch
+ source = 0001-Fix-conftest-to-ignore-implicit-function-declaration.patch
+ source = 0002-Fix-conftest-to-use-a-short-wchar_t.patch
+ source = 0003-Fix-conftest-to-use-nv_drm_gem_vmap-which-has-the-se.patch
sha512sums = de7116c09f282a27920a1382df84aa86f559e537664bb30689605177ce37dc5067748acf9afd66a3269a6e323461356592fdfc624c86523bf105ff8fe47d3770
sha512sums = 4b3ad73f5076ba90fe0b3a2e712ac9cde76f469cd8070280f960c3ce7dc502d1927f525ae18d008075c8f08ea432f7be0a6c3a7a6b49c361126dcf42f97ec499
sha512sums = e307e5fe005dfafee35c179c5f215e22a85dfd367a9b60d5092eee96f869d8ce4595fae33ce6febb74721974c6f781a53418ce1a3210768632347471ae3f5594
@@ -21,6 +24,9 @@ pkgbase = nvidia-470xx-utils
sha512sums = 40ea983c81851b8a20629a943f9692cc0e007c815f46dd3b63cf1d7a44ccbed1ac5f9a3110720de54b017b9f9c7f5cc534ec6e097bc02fa5bd1de6b0a730c803
sha512sums = fa9985b0dd9d7a973019da88a40d7830ea53df83af2d71d498b6b9dde04c0c797570991239dafc30cc2ccabbb8e8a7c3fa1bf89f26d8e8a26e624d7a17e5a84b
sha512sums = e0756be173930faf6b5104562d8092ccf8967fba7bf1a97d8e0e86e76a5e0e944b41f24aaee98eb8c7b3ad995353f6acb20a0f6173b82ee718664293a6493fea
+ sha512sums = 29df50e64a4f797028d05df78395683ce14b604fc7c7f8270c9c23b57311cfba749c132e8530d48eee935c2187323b14c6c429bf70243314350b99d2cac23acc
+ sha512sums = 6cf622b8c139e1a08c7fcf248a6b5e2054cbad765fda9709c2ead17a937a2fe3d6822703ae406f0505d5f49511903b993a41f136b5329f7553dca973dc058280
+ sha512sums = 118e38fe021c3b182a6014d5a0dafe5251a30fdb3424813a2808d0494c4021951ebf561fc15c60544e5fd4b24d1f5d944d473b16d3d641428de45acb605fd48f
pkgname = nvidia-470xx-utils
pkgdesc = NVIDIA drivers utilities
diff --git a/0001-Fix-conftest-to-ignore-implicit-function-declaration.patch b/0001-Fix-conftest-to-ignore-implicit-function-declaration.patch
new file mode 100644
index 000000000000..d29f0f55c9ec
--- /dev/null
+++ b/0001-Fix-conftest-to-ignore-implicit-function-declaration.patch
@@ -0,0 +1,27 @@
+From: Benjamin ROBIN <dev@benjarobin.fr>
+Date: Sun, 12 May 2024 17:06:20 +0200
+Subject: [PATCH 1/3] Fix conftest to ignore implicit-function-declaration and
+ strict-prototypes warnings
+
+conftest rely on the fact that a missing prototype should build, but an invalid
+call to a function (missing function parameters) the build fail.
+---
+ conftest.sh | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/conftest.sh b/conftest.sh
+index ea2676e..6e6da83 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -101,7 +101,8 @@ test_header_presence() {
+ 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"
+--
+2.45.0
diff --git a/0002-Fix-conftest-to-use-a-short-wchar_t.patch b/0002-Fix-conftest-to-use-a-short-wchar_t.patch
new file mode 100644
index 000000000000..bceb96e122f8
--- /dev/null
+++ b/0002-Fix-conftest-to-use-a-short-wchar_t.patch
@@ -0,0 +1,25 @@
+From: Benjamin ROBIN <dev@benjarobin.fr>
+Date: Sun, 12 May 2024 17:45:43 +0200
+Subject: [PATCH 2/3] Fix conftest to use a short wchar_t
+
+Fix build error about ``const efi_char16_t *v = L"SecureBoot"``
+when including include/linux/efi.h
+---
+ conftest.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/conftest.sh b/conftest.sh
+index 6e6da83..678b79c 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -101,7 +101,7 @@ test_header_presence() {
+ build_cflags() {
+ BASE_CFLAGS="-O2 -D__KERNEL__ \
+ -DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
+--nostdinc -isystem $ISYSTEM \
++-nostdinc -isystem $ISYSTEM -fshort-wchar \
+ -Wno-implicit-function-declaration -Wno-strict-prototypes"
+
+ if [ "$OUTPUT" != "$SOURCES" ]; then
+--
+2.45.0
diff --git a/0003-Fix-conftest-to-use-nv_drm_gem_vmap-which-has-the-se.patch b/0003-Fix-conftest-to-use-nv_drm_gem_vmap-which-has-the-se.patch
new file mode 100644
index 000000000000..34e8b28f73f2
--- /dev/null
+++ b/0003-Fix-conftest-to-use-nv_drm_gem_vmap-which-has-the-se.patch
@@ -0,0 +1,31 @@
+From: Benjamin ROBIN <dev@benjarobin.fr>
+Date: Sun, 12 May 2024 17:54:18 +0200
+Subject: [PATCH 3/3] Fix conftest to use nv_drm_gem_vmap() which has the
+ secondary map argument
+
+See https://forums.developer.nvidia.com/t/nvidia-modules-build-failure-with-upcoming-gcc-14-and-recent-kernels-due-to-misfiring-conftest-sh-test-heads-up/279072
+---
+ conftest.sh | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/conftest.sh b/conftest.sh
+index 678b79c..606f13d 100755
+--- a/conftest.sh
++++ b/conftest.sh
+@@ -4593,8 +4593,13 @@ compile_test() {
+ #
+ CODE="
+ #include <drm/drm_gem.h>
++ #if defined(NV_LINUX_IOSYS_MAP_H_PRESENT)
++ typedef struct iosys_map nv_sysio_map_t;
++ #else
++ typedef struct dma_buf_map nv_sysio_map_t;
++ #endif
+ int conftest_drm_gem_object_vmap_has_map_arg(
+- struct drm_gem_object *obj, struct dma_buf_map *map) {
++ struct drm_gem_object *obj, nv_sysio_map_t *map) {
+ return obj->funcs->vmap(obj, map);
+ }"
+
+--
+2.45.0
diff --git a/PKGBUILD b/PKGBUILD
index 15fd45f85702..0cdcbde8b93d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@
pkgbase=nvidia-470xx-utils
pkgname=('nvidia-470xx-utils' 'opencl-nvidia-470xx' 'nvidia-470xx-dkms')
pkgver=470.239.06
-pkgrel=1
+pkgrel=2
arch=('x86_64')
url="http://www.nvidia.com/"
license=('custom')
@@ -22,16 +22,22 @@ source=('nvidia-drm-outputclass.conf'
"kernel-6.4.patch"
"kernel-6.5.patch"
"kernel-6.6.patch"
- "kernel-6.1.76_6.6.15_6.7.3.patch")
-
-sha512sums=('de7116c09f282a27920a1382df84aa86f559e537664bb30689605177ce37dc5067748acf9afd66a3269a6e323461356592fdfc624c86523bf105ff8fe47d3770' #nvidia-drm-outputclass
- '4b3ad73f5076ba90fe0b3a2e712ac9cde76f469cd8070280f960c3ce7dc502d1927f525ae18d008075c8f08ea432f7be0a6c3a7a6b49c361126dcf42f97ec499' #nvidia-470xx.sysusers
- 'e307e5fe005dfafee35c179c5f215e22a85dfd367a9b60d5092eee96f869d8ce4595fae33ce6febb74721974c6f781a53418ce1a3210768632347471ae3f5594' #nvidia-470xx.rules
- '92bdfb11db405071cd58deed2a0853448932657e256258e0a0bda5069f00485e2b6e49b4a0eeff499a4991be4f884273f3564c164110b1ed1f5d924506f13e2d' #NVIDIA-Linux-*.run (changed most often)
- 'd9df8b13d5fbe4f456a31de3679fd11aca7cd88771f8f11a5cc8ab17bab05861823b26d2d467593e5b90967a2902db691ca832f09fe21a5975eb3e4d6275e00c' #kernel-6.4 patch
- '40ea983c81851b8a20629a943f9692cc0e007c815f46dd3b63cf1d7a44ccbed1ac5f9a3110720de54b017b9f9c7f5cc534ec6e097bc02fa5bd1de6b0a730c803' #kernel-6.5 patch
- 'fa9985b0dd9d7a973019da88a40d7830ea53df83af2d71d498b6b9dde04c0c797570991239dafc30cc2ccabbb8e8a7c3fa1bf89f26d8e8a26e624d7a17e5a84b' #kernel-6.6 patch
- 'e0756be173930faf6b5104562d8092ccf8967fba7bf1a97d8e0e86e76a5e0e944b41f24aaee98eb8c7b3ad995353f6acb20a0f6173b82ee718664293a6493fea') #kernel-6.1 patch
+ "kernel-6.1.76_6.6.15_6.7.3.patch"
+ "0001-Fix-conftest-to-ignore-implicit-function-declaration.patch"
+ "0002-Fix-conftest-to-use-a-short-wchar_t.patch"
+ "0003-Fix-conftest-to-use-nv_drm_gem_vmap-which-has-the-se.patch")
+
+sha512sums=('de7116c09f282a27920a1382df84aa86f559e537664bb30689605177ce37dc5067748acf9afd66a3269a6e323461356592fdfc624c86523bf105ff8fe47d3770'
+ '4b3ad73f5076ba90fe0b3a2e712ac9cde76f469cd8070280f960c3ce7dc502d1927f525ae18d008075c8f08ea432f7be0a6c3a7a6b49c361126dcf42f97ec499'
+ 'e307e5fe005dfafee35c179c5f215e22a85dfd367a9b60d5092eee96f869d8ce4595fae33ce6febb74721974c6f781a53418ce1a3210768632347471ae3f5594'
+ '92bdfb11db405071cd58deed2a0853448932657e256258e0a0bda5069f00485e2b6e49b4a0eeff499a4991be4f884273f3564c164110b1ed1f5d924506f13e2d'
+ 'd9df8b13d5fbe4f456a31de3679fd11aca7cd88771f8f11a5cc8ab17bab05861823b26d2d467593e5b90967a2902db691ca832f09fe21a5975eb3e4d6275e00c'
+ '40ea983c81851b8a20629a943f9692cc0e007c815f46dd3b63cf1d7a44ccbed1ac5f9a3110720de54b017b9f9c7f5cc534ec6e097bc02fa5bd1de6b0a730c803'
+ 'fa9985b0dd9d7a973019da88a40d7830ea53df83af2d71d498b6b9dde04c0c797570991239dafc30cc2ccabbb8e8a7c3fa1bf89f26d8e8a26e624d7a17e5a84b'
+ 'e0756be173930faf6b5104562d8092ccf8967fba7bf1a97d8e0e86e76a5e0e944b41f24aaee98eb8c7b3ad995353f6acb20a0f6173b82ee718664293a6493fea'
+ '29df50e64a4f797028d05df78395683ce14b604fc7c7f8270c9c23b57311cfba749c132e8530d48eee935c2187323b14c6c429bf70243314350b99d2cac23acc'
+ '6cf622b8c139e1a08c7fcf248a6b5e2054cbad765fda9709c2ead17a937a2fe3d6822703ae406f0505d5f49511903b993a41f136b5329f7553dca973dc058280'
+ '118e38fe021c3b182a6014d5a0dafe5251a30fdb3424813a2808d0494c4021951ebf561fc15c60544e5fd4b24d1f5d944d473b16d3d641428de45acb605fd48f')
create_links() {
# create soname links
@@ -50,11 +56,15 @@ prepare() {
bsdtar -xf nvidia-persistenced-init.tar.bz2
cd kernel
-
-# patch -p1 -i "$srcdir/kernel-6.4.patch"
-# patch -p1 -i "$srcdir/kernel-6.5.patch"
-# patch -p1 -i "$srcdir/kernel-6.6.patch"
-# patch -p1 -i "$srcdir/kernel-6.1.76_6.6.15_6.7.3.patch"
+
+ patch -p1 -i "${srcdir}/0001-Fix-conftest-to-ignore-implicit-function-declaration.patch"
+ patch -p1 -i "${srcdir}/0002-Fix-conftest-to-use-a-short-wchar_t.patch"
+ patch -p1 -i "${srcdir}/0003-Fix-conftest-to-use-nv_drm_gem_vmap-which-has-the-se.patch"
+
+# patch -p1 -i "${srcdir}/kernel-6.4.patch"
+# patch -p1 -i "${srcdir}/kernel-6.5.patch"
+# patch -p1 -i "${srcdir}/kernel-6.6.patch"
+# patch -p1 -i "${srcdir}/kernel-6.1.76_6.6.15_6.7.3.patch"
sed -i "s/__VERSION_STRING/${pkgver}/" dkms.conf
sed -i 's/__JOBS/`nproc`/' dkms.conf