diff options
6 files changed, 96 insertions, 6 deletions
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-390.151.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-390.151.ebuild index a76225d551c3..899eae8420ab 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-390.151.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-390.151.ebuild @@ -177,7 +177,22 @@ src_compile() { NV_VERBOSE=1 DO_STRIP= MANPAGE_GZIP= OUTPUTDIR=out ) - 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 if use persistenced; then # 390.xx persistenced does not auto-detect libtirpc diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.129.06.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-470.129.06.ebuild index 19ecb17aad10..6d7c0b7fb3bc 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-470.129.06.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-470.129.06.ebuild @@ -175,7 +175,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 diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.62.30.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-470.62.30.ebuild index 8c77f921b745..42d21e9962a4 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-470.62.30.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-470.62.30.ebuild @@ -175,7 +175,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 diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-510.73.05.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-510.73.05.ebuild index 0921e41c8ac8..0401adaf9dd2 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-510.73.05.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-510.73.05.ebuild @@ -180,7 +180,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 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 diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-515.48.07.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-515.48.07.ebuild index 462e7a7ec053..f5bb02ed1629 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-515.48.07.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-515.48.07.ebuild @@ -202,7 +202,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 |