system/nvidia-legacy470-kernel: Update patch for current.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Lenard Spencer 2024-05-17 22:07:46 +07:00 committed by Willy Sudiarto Raharjo
parent 0638d40bec
commit 1252cd7700
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 38 additions and 1 deletions

View file

@ -15,3 +15,6 @@ xorg.conf.
The xf86-video-nouveau-blacklist package from /extra is required.
The Nvidia 470.xx series will be supported through December 2024.
NOTE: To build in -current with gcc14 against the new 6.9.x kernel,
pass "CURRENT=yes" to the script.

View file

@ -0,0 +1,29 @@
diff --git a/conftest.sh b/conftest.sh
index 6e6da83..678b79c 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 -fshort-wchar \
+-Wno-implicit-function-declaration -Wno-strict-prototypes"
if [ "$OUTPUT" != "$SOURCES" ]; then
OUTPUT_CFLAGS="-I$OUTPUT/include2 -I$OUTPUT/include"
@@ -4592,8 +4592,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);
}"

View file

@ -32,7 +32,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=nvidia-legacy470-kernel
VERSION=${VERSION:-470.239.06}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -89,6 +89,11 @@ find -L . \
unset ARCH
# Patch for gcc-14 in current:
if [ "${CURRENT:-no}" = "yes" ]; then
patch -p1 < $CWD/nvidia-470.239.06-gcc14.patch
fi
# CC=${CC:-gcc} suppresses an otherwise harmless "compiler mismatch"
# message. If you custom-build your kernel with clang,
# then pass CC=clang to this script.