summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-09-16 01:14:10 -0400
committerIonen Wolkens <ionen@gentoo.org>2022-09-16 02:05:35 -0400
commite1b84c5ad27be16032ac596f0cad88869b3c1741 (patch)
treeff3e2d7761a11b09e4ce3f4eef804f263b735e4f /x11-drivers
parentdev-games/godot: drop 4.0_alpha16, 4.0_alpha17 (diff)
downloadgentoo-e1b84c5ad27be16032ac596f0cad88869b3c1741.tar.gz
gentoo-e1b84c5ad27be16032ac596f0cad88869b3c1741.tar.bz2
gentoo-e1b84c5ad27be16032ac596f0cad88869b3c1741.zip
x11-drivers/nvidia-drivers: fix building modules with clang15
Closes: https://bugs.gentoo.org/870238 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drivers-390.154-clang15.patch81
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drivers-470.141.03-clang15.patch107
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-390.154.ebuild1
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-470.141.03.ebuild1
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-510.85.02.ebuild1
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-515.49.15.ebuild4
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-515.65.01.ebuild4
7 files changed, 199 insertions, 0 deletions
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-390.154-clang15.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-390.154-clang15.patch
new file mode 100644
index 000000000000..85d502ca662f
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-390.154-clang15.patch
@@ -0,0 +1,81 @@
+https://bugs.gentoo.org/870238
+--- a/kernel/nvidia/nvlink_linux.c
++++ b/kernel/nvidia/nvlink_linux.c
+@@ -639 +639 @@
+-void * NVLINK_API_CALL nvlink_allocLock()
++void * NVLINK_API_CALL nvlink_allocLock(void)
+--- a/kernel/nvidia/os-interface.c
++++ b/kernel/nvidia/os-interface.c
+@@ -879 +879 @@
+-NV_STATUS NV_API_CALL os_flush_cpu_cache()
++NV_STATUS NV_API_CALL os_flush_cpu_cache(void)
+@@ -886 +886 @@
+-NV_STATUS NV_API_CALL os_flush_cpu_cache_all()
++NV_STATUS NV_API_CALL os_flush_cpu_cache_all(void)
+@@ -944 +944 @@
+-void NV_API_CALL os_flush_cpu_write_combine_buffer()
++void NV_API_CALL os_flush_cpu_write_combine_buffer(void)
+@@ -1073 +1073 @@
+-NvU32 NV_API_CALL os_get_cpu_number()
++NvU32 NV_API_CALL os_get_cpu_number(void)
+@@ -1080 +1080 @@
+-NvU32 NV_API_CALL os_get_cpu_count()
++NvU32 NV_API_CALL os_get_cpu_count(void)
+@@ -1155 +1155 @@
+-void NV_API_CALL os_dump_stack()
++void NV_API_CALL os_dump_stack(void)
+--- a/kernel/nvidia-uvm/uvm8_lock.c
++++ b/kernel/nvidia-uvm/uvm8_lock.c
+@@ -312 +312 @@
+-bool __uvm_thread_check_all_unlocked()
++bool __uvm_thread_check_all_unlocked(void)
+--- a/kernel/nvidia-uvm/uvm8_perf_heuristics.c
++++ b/kernel/nvidia-uvm/uvm8_perf_heuristics.c
+@@ -29 +29 @@
+-NV_STATUS uvm_perf_heuristics_init()
++NV_STATUS uvm_perf_heuristics_init(void)
+@@ -44 +44 @@
+-void uvm_perf_heuristics_exit()
++void uvm_perf_heuristics_exit(void)
+--- a/kernel/nvidia-uvm/uvm8_perf_prefetch.c
++++ b/kernel/nvidia-uvm/uvm8_perf_prefetch.c
+@@ -462 +462 @@
+-NV_STATUS uvm_perf_prefetch_init()
++NV_STATUS uvm_perf_prefetch_init(void)
+@@ -500 +500 @@
+-void uvm_perf_prefetch_exit()
++void uvm_perf_prefetch_exit(void)
+--- a/kernel/nvidia-uvm/uvm8_perf_thrashing.c
++++ b/kernel/nvidia-uvm/uvm8_perf_thrashing.c
+@@ -1324 +1324 @@
+-NV_STATUS uvm_perf_thrashing_init()
++NV_STATUS uvm_perf_thrashing_init(void)
+@@ -1401 +1401 @@
+-void uvm_perf_thrashing_exit()
++void uvm_perf_thrashing_exit(void)
+--- a/kernel/nvidia-uvm/uvm8_procfs.c
++++ b/kernel/nvidia-uvm/uvm8_procfs.c
+@@ -61 +61 @@
+-NV_STATUS uvm_procfs_init()
++NV_STATUS uvm_procfs_init(void)
+@@ -77 +77 @@
+-void uvm_procfs_exit()
++void uvm_procfs_exit(void)
+@@ -106 +106 @@
+-struct proc_dir_entry *uvm_procfs_get_gpu_base_dir()
++struct proc_dir_entry *uvm_procfs_get_gpu_base_dir(void)
+--- a/kernel/nvidia-uvm/uvm8_push.c
++++ b/kernel/nvidia-uvm/uvm8_push.c
+@@ -103 +103 @@
+-bool uvm_push_info_is_tracking_descriptions()
++bool uvm_push_info_is_tracking_descriptions(void)
+--- a/kernel/nvidia-uvm/uvm8_tools.c
++++ b/kernel/nvidia-uvm/uvm8_tools.c
+@@ -2041 +2041 @@
+-void uvm_tools_flush_events()
++void uvm_tools_flush_events(void)
+--- a/kernel/nvidia-uvm/uvm_common.c
++++ b/kernel/nvidia-uvm/uvm_common.c
+@@ -63 +63 @@
+-bool uvm_debug_prints_enabled()
++bool uvm_debug_prints_enabled(void)
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.141.03-clang15.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.141.03-clang15.patch
new file mode 100644
index 000000000000..71cb6cf7e980
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.141.03-clang15.patch
@@ -0,0 +1,107 @@
+https://bugs.gentoo.org/870238
+--- a/kernel/nvidia/nvlink_linux.c
++++ b/kernel/nvidia/nvlink_linux.c
+@@ -571 +571 @@
+-void * nvlink_allocLock()
++void * nvlink_allocLock(void)
+--- a/kernel/nvidia/os-interface.c
++++ b/kernel/nvidia/os-interface.c
+@@ -1076 +1076 @@
+-NvU32 NV_API_CALL os_get_cpu_number()
++NvU32 NV_API_CALL os_get_cpu_number(void)
+@@ -1083 +1083 @@
+-NvU32 NV_API_CALL os_get_cpu_count()
++NvU32 NV_API_CALL os_get_cpu_count(void)
+@@ -1136 +1136 @@
+-void NV_API_CALL os_dump_stack()
++void NV_API_CALL os_dump_stack(void)
+--- a/kernel/nvidia-uvm/uvm_common.c
++++ b/kernel/nvidia-uvm/uvm_common.c
+@@ -37 +37 @@
+-bool uvm_debug_prints_enabled()
++bool uvm_debug_prints_enabled(void)
+--- a/kernel/nvidia-uvm/uvm_gpu_access_counters.c
++++ b/kernel/nvidia-uvm/uvm_gpu_access_counters.c
+@@ -1527 +1527 @@
+-NV_STATUS uvm_perf_access_counters_init()
++NV_STATUS uvm_perf_access_counters_init(void)
+@@ -1538 +1538 @@
+-void uvm_perf_access_counters_exit()
++void uvm_perf_access_counters_exit(void)
+--- a/kernel/nvidia-uvm/uvm_lock.c
++++ b/kernel/nvidia-uvm/uvm_lock.c
+@@ -337 +337 @@
+-bool __uvm_thread_check_all_unlocked()
++bool __uvm_thread_check_all_unlocked(void)
+--- a/kernel/nvidia-uvm/uvm_migrate.c
++++ b/kernel/nvidia-uvm/uvm_migrate.c
+@@ -795 +795 @@
+-NV_STATUS uvm_migrate_init()
++NV_STATUS uvm_migrate_init(void)
+@@ -821 +821 @@
+-void uvm_migrate_exit()
++void uvm_migrate_exit(void)
+--- a/kernel/nvidia-uvm/uvm_migrate_pageable.c
++++ b/kernel/nvidia-uvm/uvm_migrate_pageable.c
+@@ -979 +979 @@
+-NV_STATUS uvm_migrate_pageable_init()
++NV_STATUS uvm_migrate_pageable_init(void)
+@@ -988 +988 @@
+-void uvm_migrate_pageable_exit()
++void uvm_migrate_pageable_exit(void)
+--- a/kernel/nvidia-uvm/uvm_perf_heuristics.c
++++ b/kernel/nvidia-uvm/uvm_perf_heuristics.c
+@@ -31 +31 @@
+-NV_STATUS uvm_perf_heuristics_init()
++NV_STATUS uvm_perf_heuristics_init(void)
+@@ -50 +50 @@
+-void uvm_perf_heuristics_exit()
++void uvm_perf_heuristics_exit(void)
+--- a/kernel/nvidia-uvm/uvm_perf_prefetch.c
++++ b/kernel/nvidia-uvm/uvm_perf_prefetch.c
+@@ -463 +463 @@
+-NV_STATUS uvm_perf_prefetch_init()
++NV_STATUS uvm_perf_prefetch_init(void)
+@@ -501 +501 @@
+-void uvm_perf_prefetch_exit()
++void uvm_perf_prefetch_exit(void)
+--- a/kernel/nvidia-uvm/uvm_perf_thrashing.c
++++ b/kernel/nvidia-uvm/uvm_perf_thrashing.c
+@@ -1955 +1955 @@
+-NV_STATUS uvm_perf_thrashing_init()
++NV_STATUS uvm_perf_thrashing_init(void)
+@@ -2014 +2014 @@
+-void uvm_perf_thrashing_exit()
++void uvm_perf_thrashing_exit(void)
+--- a/kernel/nvidia-uvm/uvm_procfs.c
++++ b/kernel/nvidia-uvm/uvm_procfs.c
+@@ -49 +49 @@
+-NV_STATUS uvm_procfs_init()
++NV_STATUS uvm_procfs_init(void)
+@@ -69 +69 @@
+-void uvm_procfs_exit()
++void uvm_procfs_exit(void)
+@@ -98 +98 @@
+-struct proc_dir_entry *uvm_procfs_get_gpu_base_dir()
++struct proc_dir_entry *uvm_procfs_get_gpu_base_dir(void)
+@@ -103 +103 @@
+-struct proc_dir_entry *uvm_procfs_get_cpu_base_dir()
++struct proc_dir_entry *uvm_procfs_get_cpu_base_dir(void)
+--- a/kernel/nvidia-uvm/uvm_push.c
++++ b/kernel/nvidia-uvm/uvm_push.c
+@@ -245 +245 @@
+-bool uvm_push_info_is_tracking_descriptions()
++bool uvm_push_info_is_tracking_descriptions(void)
+@@ -250 +250 @@
+-bool uvm_push_info_is_tracking_acquires()
++bool uvm_push_info_is_tracking_acquires(void)
+--- a/kernel/nvidia-uvm/uvm_thread_context.c
++++ b/kernel/nvidia-uvm/uvm_thread_context.c
+@@ -104 +104 @@
+-bool uvm_thread_context_wrapper_is_used()
++bool uvm_thread_context_wrapper_is_used(void)
+--- a/kernel/nvidia-uvm/uvm_tools.c
++++ b/kernel/nvidia-uvm/uvm_tools.c
+@@ -2144 +2144 @@
+-void uvm_tools_flush_events()
++void uvm_tools_flush_events(void)
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-390.154.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-390.154.ebuild
index a13b4048b927..b73a7c2ccd4e 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-390.154.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-390.154.ebuild
@@ -73,6 +73,7 @@ BDEPEND="
QA_PREBUILT="opt/bin/* usr/lib*"
PATCHES=(
+ "${FILESDIR}"/nvidia-drivers-390.154-clang15.patch
"${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch
"${FILESDIR}"/nvidia-settings-390.141-fno-common.patch
"${FILESDIR}"/nvidia-settings-390.144-desktop.patch
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.141.03.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-470.141.03.ebuild
index de3196b87ae6..cc7b2513a5a3 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-470.141.03.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-470.141.03.ebuild
@@ -76,6 +76,7 @@ BDEPEND="
QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*"
PATCHES=(
+ "${FILESDIR}"/nvidia-drivers-470.141.03-clang15.patch
"${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch
"${FILESDIR}"/nvidia-settings-390.144-desktop.patch
"${FILESDIR}"/nvidia-settings-390.144-no-gtk2.patch
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-510.85.02.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-510.85.02.ebuild
index 35ec0faaa70c..632cee27f396 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-510.85.02.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-510.85.02.ebuild
@@ -79,6 +79,7 @@ BDEPEND="
QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*"
PATCHES=(
+ "${FILESDIR}"/nvidia-drivers-470.141.03-clang15.patch
"${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch
"${FILESDIR}"/nvidia-settings-390.144-desktop.patch
"${FILESDIR}"/nvidia-settings-390.144-no-gtk2.patch
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-515.49.15.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-515.49.15.ebuild
index c2597443890a..628cd1a50969 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-515.49.15.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-515.49.15.ebuild
@@ -81,6 +81,7 @@ BDEPEND="
QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*"
PATCHES=(
+ "${FILESDIR}"/nvidia-drivers-470.141.03-clang15.patch
"${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch
"${FILESDIR}"/nvidia-settings-390.144-desktop.patch
"${FILESDIR}"/nvidia-settings-390.144-no-gtk2.patch
@@ -164,6 +165,9 @@ src_prepare() {
rm nvidia-xconfig && mv nvidia-xconfig{-${NV_PIN},} || die
mv open-gpu-kernel-modules-${PV} kernel-module-source || die
+ eapply --directory=kernel-module-source/kernel-open \
+ -p2 "${FILESDIR}"/nvidia-drivers-470.141.03-clang15.patch
+
default
# prevent detection of incomplete kernel DRM support (bug #603818)
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-515.65.01.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-515.65.01.ebuild
index f48badecc24c..c95218f51107 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-515.65.01.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-515.65.01.ebuild
@@ -81,6 +81,7 @@ BDEPEND="
QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*"
PATCHES=(
+ "${FILESDIR}"/nvidia-drivers-470.141.03-clang15.patch
"${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch
"${FILESDIR}"/nvidia-settings-390.144-desktop.patch
"${FILESDIR}"/nvidia-settings-390.144-no-gtk2.patch
@@ -164,6 +165,9 @@ src_prepare() {
rm nvidia-xconfig && mv nvidia-xconfig{-${PV},} || die
mv NVIDIA-kernel-module-source-${PV} kernel-module-source || die
+ eapply --directory=kernel-module-source/kernel-open \
+ -p2 "${FILESDIR}"/nvidia-drivers-470.141.03-clang15.patch
+
default
# prevent detection of incomplete kernel DRM support (bug #603818)