Created attachment 906940 [details] build.log When -Og is in CFLAGS, the compile fails btf_dump.c: In function ‘btf_dump_emit_bit_padding’: btf_dump.c:903:42: error: ‘new_off’ may be used uninitialized [-Werror=maybe-uninitialized] 903 | if (new_off > cur_off && new_off <= next_off) { | ~~~~~~~~^~~~~~~~~~~ btf_dump.c:870:13: note: ‘new_off’ was declared here 870 | int new_off, pad_bits, bits, i; | ^~~~~~~ btf_dump.c:917:25: error: ‘pad_type’ may be used uninitialized [-Werror=maybe-uninitialized] 917 | btf_dump_printf(d, "\n%s%s: %d;", pfx(lvl), pad_type, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 918 | in_bitfield ? new_off - cur_off : 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ btf_dump.c:871:21: note: ‘pad_type’ was declared here 871 | const char *pad_type; | ^~~~~~~~ btf_dump.c:930:20: error: ‘pad_bits’ may be used uninitialized [-Werror=maybe-uninitialized] 930 | if (bits == pad_bits) { | ^ btf_dump.c:870:22: note: ‘pad_bits’ was declared here 870 | int new_off, pad_bits, bits, i; | ^~~~~~~~ If -Og is disabled it compiles. Patches have been submitted to upstream to fix: https://lore.kernel.org/lkml/ZxlrAiA2t00YMjRz@x1/T/
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=7a4ffec9fd54ea27395e24dff726dbf58e2fe06b https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=7f4ec77f3fee41dd6a41f03a40703889e6e8f7b2 https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=2c3d022abe6c3165109393b75a127b06c2c70063
Queued for the next genpatches 6.6 patchset. Is this needed for other versions ?
We may need them for 6.10+6.11 too but I haven't checked
Queued for 6.11.X
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18ad0c1a648cfb97fde0f08f848f0ed75fc4c083 commit 18ad0c1a648cfb97fde0f08f848f0ed75fc4c083 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-04-07 20:44:57 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-04-07 20:48:29 +0000 kernel-build.eclass: disable -Werror (for host tools at least) WERROR=0 disables -Werror for host tools at least, so let's use that. I'll also send a config change. Bug: https://bugs.gentoo.org/939106 Bug: https://bugs.gentoo.org/940904 Bug: https://bugs.gentoo.org/942303 Signed-off-by: Sam James <sam@gentoo.org> eclass/kernel-build.eclass | 1 + 1 file changed, 1 insertion(+)