Skip to content

Commit

Permalink
Disable GCC plugins for out of tree kernel modules
Browse files Browse the repository at this point in the history
kernel modules built in VM often use different gcc version, which makes
provided gcc plugins incompatible. Since rebuilding those plugins may
not be straight forward (extra gcc headers needed, possibly kernel
config changes needed if gcc version differs significantly), disable
them for out of tree modules.

Fixes QubesOS/qubes-issues#2844
  • Loading branch information
marmarek committed Jun 5, 2019
1 parent d1ad508 commit e3a3420
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kernel.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,11 @@ cp Module.markers %buildroot/lib/modules/%kernelrelease/build
fi

rm -rf %buildroot/lib/modules/%kernelrelease/build/Documentation
cp .config %buildroot/lib/modules/%kernelrelease/build

# disable GCC plugins for external modules build, to not fail if different gcc
# version is used
sed -e 's/^\(CONFIG_GCC_PLUGIN.*\)=y/# \1 is not set/' .config > \
%buildroot/lib/modules/%kernelrelease/build/.config

rm -f %buildroot/lib/modules/%kernelrelease/build/scripts/*.o
rm -f %buildroot/lib/modules/%kernelrelease/build/scripts/*/*.o
Expand Down

0 comments on commit e3a3420

Please sign in to comment.