-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nvidia 470xx modules with Clang build fixes (#319)
Signed-off-by: Vasiliy Stelmachenok <[email protected]>
- Loading branch information
Showing
17 changed files
with
755 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
pkgbase = nvidia-470xx-utils | ||
pkgver = 470.256.02 | ||
pkgrel = 7 | ||
url = http://www.nvidia.com/ | ||
arch = x86_64 | ||
license = custom | ||
options = !strip | ||
source = nvidia-drm-outputclass.conf | ||
source = nvidia-470xx-utils.sysusers | ||
source = nvidia-470xx.rules | ||
source = systemd-homed-override.conf | ||
source = systemd-suspend-override.conf | ||
source = https://us.download.nvidia.com/XFree86/Linux-x86_64/470.256.02/NVIDIA-Linux-x86_64-470.256.02.run | ||
source = kernel-6.10.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 | ||
source = clang.patch | ||
sha512sums = de7116c09f282a27920a1382df84aa86f559e537664bb30689605177ce37dc5067748acf9afd66a3269a6e323461356592fdfc624c86523bf105ff8fe47d3770 | ||
sha512sums = 4b3ad73f5076ba90fe0b3a2e712ac9cde76f469cd8070280f960c3ce7dc502d1927f525ae18d008075c8f08ea432f7be0a6c3a7a6b49c361126dcf42f97ec499 | ||
sha512sums = 4e870d1ec819e74757a65762484a44fea2c71d090f0898c7f8c193fc8539c29f3b14ecec9d1216ed23d6978ade9e7376f81c7d8242b7005c8c067171eb6df40a | ||
sha512sums = a0183adce78e40853edf7e6b73867e7a8ea5dabac8e8164e42781f64d5232fbe869f850ab0697c3718ebced5cde760d0e807c05da50a982071dfe1157c31d6b8 | ||
sha512sums = 55def6319f6abb1a4ccd28a89cd60f1933d155c10ba775b8dfa60a2dc5696b4b472c14b252dc0891f956e70264be87c3d5d4271e929a4fc4b1a68a6902814cee | ||
sha512sums = a837946dd24d7945c1962a695f1f31965f3ceb6927f52cd08fd51b8db138b7a888bbeab69243f5c8468a7bd7ccd47f5dbdb48a1ca81264866c1ebb7d88628f88 | ||
sha512sums = 4ab58f1eb2d48c4d24c86a120dfd0989da0f56fd5f85dad0c7960fabe9e19ac1d594775d3d4a3044ac6ceb9425cd7c840320503aa01252574ed12ce62445796e | ||
sha512sums = b4dc0282a431dfde2bcbd1f3a13eccd9d34c71fccb803f3ddf739b570ac6e129178f6eed370f78529f7757b405668fbd29d36aa530c9d0fc79eb19092725bcd7 | ||
sha512sums = dbdd609247740079446faf38482c7c14c03fbd71f816812d26c803b2619de7b7d7f034048fc8f662c5b864dd43b8e75aa7c09a837b31dd08655e6622f00ee1e3 | ||
sha512sums = e1371e2ed622d642b0242a2be34438fae97fa33ef42afc1e7897177c10dc8831f20b9a8b37d25d9dc079743df03b10221decfb23577650233af8981a4ffb813c | ||
sha512sums = 90f67069aa2e5dc0397d8848e615c0fd292210c7b05f7f390e564e09301844bb7cbd88cf4361628898c59305eaec12fc49c0fe907d00b8dfb497e3035fb8d5b6 | ||
|
||
pkgname = nvidia-470xx-utils | ||
pkgdesc = NVIDIA drivers utilities | ||
install = nvidia-470xx-utils.install | ||
depends = xorg-server | ||
depends = libglvnd | ||
depends = egl-wayland | ||
optdepends = nvidia-470xx-settings: configuration tool | ||
optdepends = xorg-server-devel: nvidia-xconfig | ||
optdepends = opencl-nvidia-470xx: OpenCL support | ||
provides = vulkan-driver | ||
provides = opengl-driver | ||
provides = nvidia-libgl | ||
provides = nvidia-utils | ||
conflicts = nvidia-libgl | ||
conflicts = nvidia-utils | ||
|
||
pkgname = opencl-nvidia-470xx | ||
pkgdesc = OpenCL implemention for NVIDIA | ||
depends = zlib | ||
optdepends = opencl-headers: headers necessary for OpenCL development | ||
provides = opencl-driver | ||
provides = opencl-nvidia | ||
conflicts = opencl-nvidia | ||
|
||
pkgname = nvidia-470xx-dkms | ||
pkgdesc = NVIDIA drivers - module sources | ||
depends = dkms | ||
depends = nvidia-470xx-utils=470.256.02 | ||
depends = libglvnd | ||
provides = NVIDIA-MODULE | ||
conflicts = nvidia-dkms |
27 changes: 27 additions & 0 deletions
27
nvidia/nvidia-470xx-utils/0001-Fix-conftest-to-ignore-implicit-function-declaration.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
From: Benjamin ROBIN <[email protected]> | ||
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 | ||
--- a/conftest.sh | ||
+++ b/conftest.sh | ||
@@ -101,7 +101,9 @@ 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 \ | ||
+-Wno-incompatible-pointer-types" | ||
|
||
if [ "$OUTPUT" != "$SOURCES" ]; then | ||
OUTPUT_CFLAGS="-I$OUTPUT/include2 -I$OUTPUT/include" | ||
--- | ||
2.45.0 |
25 changes: 25 additions & 0 deletions
25
nvidia/nvidia-470xx-utils/0002-Fix-conftest-to-use-a-short-wchar_t.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From: Benjamin ROBIN <[email protected]> | ||
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 | ||
--- 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 \ | ||
-Wno-incompatible-pointer-types" | ||
|
||
if [ "$OUTPUT" != "$SOURCES" ]; then | ||
--- | ||
2.45.0 |
30 changes: 30 additions & 0 deletions
30
nvidia/nvidia-470xx-utils/0003-Fix-conftest-to-use-nv_drm_gem_vmap-which-has-the-se.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From: Benjamin ROBIN <[email protected]> | ||
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 | ||
--- 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 |
Oops, something went wrong.