diff --git a/system/nvidia-legacy470-kernel/README b/system/nvidia-legacy470-kernel/README index 453a636378..7793219958 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 0000000000..772236e5cf --- /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 ++ #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 ac68713929..22d852dbcd 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.