I guess we should compile host tools and use the binpkg for the kernel itself only. E.g.: ``` * Preparing vhba module make -j12 HOSTCC=x86_64-pc-linux-gnu-gcc-10.2.0 CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' KDIR=/usr/src/linux modules make -C /usr/src/linux M=/tmp/portage/sys-fs/vhba-20200106-r1/work/vhba-module-20200106 modules make[1]: Entering directory '/usr/src/linux-5.11.2' CC [M] /tmp/portage/sys-fs/vhba-20200106-r1/work/vhba-module-20200106/vhba.o cc1: error: incompatible gcc/plugin versions cc1: error: fail to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so make[2]: *** [scripts/Makefile.build:279: /tmp/portage/sys-fs/vhba-20200106-r1/work/vhba-module-20200106/vhba.o] Error 1 ```
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbf649f3b2a9b5f3ac80c0aba43859ea2fbc6d0d commit cbf649f3b2a9b5f3ac80c0aba43859ea2fbc6d0d Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2021-03-01 00:03:11 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2021-03-01 11:55:41 +0000 sys-kernel/gentoo-kernel-bin: Rebuild host tooling Rebuild host tooling from source when installing the binary kernel. This ensures that it is compatible with the system libraries and toolchain, in particular reducing the risk of gcc plugin version collision. Closes: https://bugs.gentoo.org/773376 Signed-off-by: Michał Górny <mgorny@gentoo.org> sys-kernel/gentoo-kernel-bin/Manifest | 9 ++ .../gentoo-kernel-bin-5.10.19-r2.ebuild | 115 +++++++++++++++++++++ .../gentoo-kernel-bin-5.11.2-r2.ebuild | 115 +++++++++++++++++++++ .../gentoo-kernel-bin-5.4.101-r2.ebuild | 115 +++++++++++++++++++++ 4 files changed, 354 insertions(+)