repo/gentoo:master commit in: x11-drivers/nvidia-drivers/

"Ionen Wolkens" <[email protected]> Tue, 04 Aug 2026 14:01:32 +0000 (UTC)
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1785852061.5d027f1f0b7833f57c9f97125f18728f6d48de06.ionen@gentoo>
commit:     5d027f1f0b7833f57c9f97125f18728f6d48de06
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  4 13:57:05 2026 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Aug  4 14:01:01 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d027f1f

x11-drivers/nvidia-drivers: workaround to build with clang+OF_GPIO

Was under the impression that this may also affect newly released
versions of older branches given they had a similar change around
gpio but could only reproduce with 610.57.04.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 x11-drivers/nvidia-drivers/nvidia-drivers-610.57.04.ebuild | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-610.57.04.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-610.57.04.ebuild
index be9933e14e3a..cd66cdd7b33a 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-610.57.04.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-610.57.04.ebuild
@@ -169,6 +169,13 @@ src_prepare() {
 	# makefile attempts to install wayland library even if not built
 	use wayland || sed -i 's/ WAYLAND_LIB_install$//' \
 		nvidia-settings/src/Makefile || die
+
+	# temporary dirty workaround for clang being stricter than gcc,
+	# reproducing requires a kernel with CONFIG_OF_GPIO enabled
+	# nv-linux.h:1737:51: error: passing 'const struct gpio_device *' [...]
+	CC=${KERNEL_CC} tc-is-clang &&
+		sed -e 's/-Wno-error/& -Wno-error=incompatible-pointer-types-discards-qualifiers/' \
+			-i kernel-module-source/kernel-open/Kbuild || die
 }
 
 src_compile() {