Created attachment 920617 [details] Emerge --info When compiling kernel 6.13.6 from source using GCC 15.1, I am receiving the following error. arch/x86/kernel/cpu/proc.c:174:14: internal compiler error: in comptypes_check_enum_int, at c/c-typeck.cc:1496 174 | const struct seq_operations cpuinfo_op = { | ^~~~~~~~~~~~~~ Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://bugs.gentoo.org/> for instructions. make[5]: *** [scripts/Makefile.build:196: arch/x86/kernel/cpu/proc.o] Error 1 make[4]: *** [scripts/Makefile.build:442: arch/x86/kernel/cpu] Error 2 make[3]: *** [scripts/Makefile.build:442: arch/x86/kernel] Error 2 make[2]: *** [scripts/Makefile.build:442: arch/x86] Error 2 make[1]: *** [/usr/src/linux-6.13.6-gentoo/Makefile:1986: .] Error 2 make: *** [Makefile:251: __sub-make] Error 2
Post an updated emerge --info as a new comment, add V=1 to the make command you are running to build the kernel, and then add -save-temps to the command which builds the file that makes the ICE happen.
I forgot to say that -save-temps will make a file with the .i extension which you would have to then find and attach here. Also, please post the complete set of CFLAGS you are using.
Thanks for assisting with this one Kostadin. I have attached the updated emerge --info and CFLAGS. However, just to confirm I am using the command "make && make modules_install" to get the kernel to build. Am I correct in thinking the command should then become "make && make modules_install V=1 -save-temps"?
Created attachment 920665 [details] Emerge --info updated
(In reply to 154koz3j6 from comment #3) > Thanks for assisting with this one Kostadin. > > I have attached the updated emerge --info and CFLAGS. > > However, just to confirm I am using the command "make && make > modules_install" to get the kernel to build. Am I correct in thinking the > command should then become "make && make modules_install V=1 -save-temps"? No, run `make V=1`, watch the log. You'll see a gcc command above the ` arch/x86/kernel/cpu/proc.c:174:14: internal compiler error: in comptypes_check_enum_int, at c/c-typeck.cc:1496` which should mention `proc.c`. Identify that line and copy/paste it, running it again with -save-temps appended, then upload proc.i along with the command you ran.
Created attachment 920666 [details] Cflags
Created attachment 920667 [details] proc.i
Thanks Sam. I've uploaded the proc.i and can confirm the command without -save-temps was: gcc -Wp,-MMD,arch/x86/kernel/cpu/.proc.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Werror -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=branch -fno-jump-tables -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -fno-jump-tables -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -fomit-frame-pointer -ftrivial-auto-var-init=zero -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -fmin-function-alignment=16 -fstrict-flex-arrays=3 -fno-strict-overflow -fno-stack-check -fconserve-stack -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wmissing-declarations -Wmissing-prototypes -Wframe-larger-than=2048 -Wno-main -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-overflow -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -fzero-init-padding-bits=all -Wextra -Wunused -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -Wno-unused-parameter -DRANDSTRUCT -fplugin=./scripts/gcc-plugins/randomize_layout_plugin.so -fplugin=./scripts/gcc-plugins/latent_entropy_plugin.so -fplugin=./scripts/gcc-plugins/stackleak_plugin.so -DLATENT_ENTROPY_PLUGIN -DSTACKLEAK_PLUGIN -fplugin-arg-stackleak_plugin-track-min-size=100 -fplugin-arg-stackleak_plugin-arch=x86 -fsanitize=bounds-strict -fsanitize-trap=undefined -DKBUILD_MODFILE='"arch/x86/kernel/cpu/proc"' -DKBUILD_BASENAME='"proc"' -DKBUILD_MODNAME='"proc"' -D__KBUILD_MODNAME=kmod_proc -c -o arch/x86/kernel/cpu/proc.o arch/x86/kernel/cpu/proc.c