At least, version 5.6.8 and 5.6.9 cannot be compiled with gcc-10. Either this is a bug (sloppy programming) in the kernel or the default compiler options (all warnings being treated as errors) are too strict for these kernels LD [M] drivers/gpu/drm/drm_kms_helper.o In file included from net/bluetooth/mgmt.c:36: In function 'eir_append_data', inlined from 'read_local_oob_ext_data' at net/bluetooth/mgmt.c:6355:13: net/bluetooth/hci_request.h:124:17: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 124 | eir[eir_len++] = sizeof(type) + data_len; | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from net/bluetooth/mgmt.c:34: net/bluetooth/mgmt.c: In function 'read_local_oob_ext_data': ./include/net/bluetooth/mgmt.h:518:7: note: at offset 0 to object 'eir' with size 0 declared here 518 | __u8 eir[0]; | ^~~ In file included from net/bluetooth/mgmt.c:36: In function 'eir_append_data', inlined from 'read_local_oob_ext_data' at net/bluetooth/mgmt.c:6355:13: net/bluetooth/hci_request.h:125:17: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 125 | eir[eir_len++] = type; | ~~~~~~~~~~~~~~~^~~~~~ In file included from net/bluetooth/mgmt.c:34: net/bluetooth/mgmt.c: In function 'read_local_oob_ext_data': ./include/net/bluetooth/mgmt.h:518:7: note: at offset 0 to object 'eir' with size 0 declared here 518 | __u8 eir[0]; | ^~~ cc1: all warnings being treated as errors make[2]: *** [scripts/Makefile.build:267: arch/x86/kvm/../../../virt/kvm/kvm_main.o] Error 1
> cc1: all warnings being treated as errors This is caused by -Werror.
I use gentoo-sources 5.6.11. It compiles fine but does not boot. I see nothing on display and nothing in logs, not sure how to proceed. I'll try re-building with GCC 9 to make sure.
(In reply to Pavel Volkov from comment #2) > I use gentoo-sources 5.6.11. > It compiles fine but does not boot. > I see nothing on display and nothing in logs, not sure how to proceed. > > I'll try re-building with GCC 9 to make sure. That is a https://bugs.gentoo.org/721734
No problem here with 5.6.12. Can you retest with the latest version of 5.6.X which is 5.6.12 as of this writing?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?h=v5.7-rc5&qt=grep&q=gcc-10 More warnings tweaks are needed, personally I've hit "Stop the ad-hoc games with -Wno-maybe-initialized" so far with GCC 10.
For me the same error with kvm enabled on kernel 5.6.11-13 and gcc10.1.0. Changing gcc to 9.3.0 compiles w/o errors.
On my system CONFIG_PLUGIN_HOSTCC is empty and no GCC plugins are being enabled. I tracked it down via: ❯ cat /usr/src/linux-5.6.13-gentoo/scripts/gcc-plugins/Kconfig # SPDX-License-Identifier: GPL-2.0-only preferred-plugin-hostcc := $(if-success,[ $(gcc-version) -ge 40800 ],$(HOSTCXX),$(HOSTCC)) config PLUGIN_HOSTCC string default "$(shell,$(srctree)/scripts/gcc-plugin.sh "$(preferred-plugin-hostcc)" "$(HOSTCXX)" "$(CC)")" if CC_IS_GCC help Host compiler used to build GCC plugins. This can be $(HOSTCXX), $(HOSTCC), or a null string if GCC plugin is unsupported. [...] to (I added `set -x` to the head of the script): ❯ /usr/src/linux-5.6.13-gentoo/scripts/gcc-plugin.sh g++ g++ gcc ++ dirname /usr/src/linux-5.6.13-gentoo/scripts/gcc-plugin.sh + srctree=/usr/src/linux-5.6.13-gentoo/scripts + SHOW_ERROR= + '[' g++ = --show-error ']' ++ gcc -print-file-name=plugin + gccplugins_dir=/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/plugin ++ g++ -E -x c++ - -o /dev/null -I/usr/src/linux-5.6.13-gentoo/scripts/gcc-plugins -I/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/plugin/include + plugincc='In file included from <stdin>:1: /usr/src/linux-5.6.13-gentoo/scripts/gcc-plugins/gcc-common.h:38:10: fatal error: params.h: No such file or directory 38 | #include "params.h" | ^~~~~~~~~~ compilation terminated.' + '[' 1 -ne 0 ']' + '[' -n '' ']' + exit 1 Should I open a separate bug for that, or does it have the same cause that's being tracked here?
Can you please test with the latest gentoo-sources-5.6.X which is 5.6.16 as of this writing. I do see gcc fixes in the stable tree.
gentoo-source-5.6.16 compiles fine for me with gcc-10.1.0. 5.6.13 requires the patch, and I have not tried .14 or .15.
All of the latest gentoo-sources are now compiling with gcc 10. If you find a new supported version not compiling, please let me know.