diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2022-06-01 12:12:05 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2022-06-01 13:08:43 -0400 |
commit | 2619dd7945d742b208b545c97b2c7635c17d9256 (patch) | |
tree | 11d66e9cf9f1b25912d6740ed5a8927dea6f537e /x11-drivers/nvidia-drivers/nvidia-drivers-515.43.04.ebuild | |
parent | app-office/libreoffice-bin-debug: Version bump (diff) | |
download | gentoo-2619dd7945d742b208b545c97b2c7635c17d9256.tar.gz gentoo-2619dd7945d742b208b545c97b2c7635c17d9256.tar.bz2 gentoo-2619dd7945d742b208b545c97b2c7635c17d9256.zip |
x11-drivers/nvidia-drivers: warn if incompatible gcc plugins
This isn't specific to nvidia-drivers (even a blank test.c
fails), but it's not uncommon this is the only third party
module that a user have and a warning wouldn't hurt.
Normally not an issue given gcc plugins are typically not
enabled by default (or the option is set, but individual
plugins are disabled) and mismatching is mostly fine.
Also note about kernel-bin given the module-specific bits
/can/ be rebuilt and it may sound confusing otherwise.
Bug: https://bugs.gentoo.org/849011
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'x11-drivers/nvidia-drivers/nvidia-drivers-515.43.04.ebuild')
-rw-r--r-- | x11-drivers/nvidia-drivers/nvidia-drivers-515.43.04.ebuild | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-515.43.04.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-515.43.04.ebuild index b3f07bbc73fc..becc8ad64bec 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-515.43.04.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-515.43.04.ebuild @@ -203,7 +203,22 @@ src_compile() { XNVCTRL_CFLAGS=-fPIC #840389 ) - use driver && linux-mod_src_compile + if use driver; then + if linux_chkconfig_present GCC_PLUGINS; then + mkdir "${T}"/plugin-test || die + echo "obj-m += test.o" > "${T}"/plugin-test/Kbuild || die + > "${T}"/plugin-test/test.c || die + if [[ $(LC_ALL=C make -C "${KV_OUT_DIR}" ARCH="$(tc-arch-kernel)" \ + HOSTCC="$(tc-getBUILD_CC)" M="${T}"/plugin-test 2>&1) \ + =~ "error: incompatible gcc/plugin version" ]]; then + ewarn "Warning: detected kernel was built with different gcc/plugin versions," + ewarn "you may need to 'make clean' and rebuild your kernel with the current" + ewarn "gcc version (or re-emerge for distribution kernels, including kernel-bin)." + fi + fi + + linux-mod_src_compile + fi emake "${NV_ARGS[@]}" -C nvidia-modprobe use persistenced && emake "${NV_ARGS[@]}" -C nvidia-persistenced |