diff options
author | Lenard Spencer <lenardrspencer@gmail.com> | 2024-05-17 22:07:46 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-05-17 23:57:44 +0700 |
commit | 1252cd770012bc90e0884a106458b9cc64bd9040 (patch) | |
tree | ac6d8c90125c0c10f1a16d0c35bbfa9daf592220 | |
parent | 0638d40bec27094daf91b448fb8477f7619719a1 (diff) |
system/nvidia-legacy470-kernel: Update patch for current.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | system/nvidia-legacy470-kernel/README | 3 | ||||
-rw-r--r-- | system/nvidia-legacy470-kernel/nvidia-470.239.06-gcc14.patch | 29 | ||||
-rw-r--r-- | system/nvidia-legacy470-kernel/nvidia-legacy470-kernel.SlackBuild | 7 |
3 files changed, 38 insertions, 1 deletions
diff --git a/system/nvidia-legacy470-kernel/README b/system/nvidia-legacy470-kernel/README index 453a636378a6..7793219958b1 100644 --- a/system/nvidia-legacy470-kernel/README +++ b/system/nvidia-legacy470-kernel/README @@ -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. diff --git a/system/nvidia-legacy470-kernel/nvidia-470.239.06-gcc14.patch b/system/nvidia-legacy470-kernel/nvidia-470.239.06-gcc14.patch new file mode 100644 index 000000000000..772236e5cfc7 --- /dev/null +++ b/system/nvidia-legacy470-kernel/nvidia-470.239.06-gcc14.patch @@ -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); + }" + diff --git a/system/nvidia-legacy470-kernel/nvidia-legacy470-kernel.SlackBuild b/system/nvidia-legacy470-kernel/nvidia-legacy470-kernel.SlackBuild index ac687139293b..22d852dbcde2 100644 --- a/system/nvidia-legacy470-kernel/nvidia-legacy470-kernel.SlackBuild +++ b/system/nvidia-legacy470-kernel/nvidia-legacy470-kernel.SlackBuild @@ -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. |