I was recompiling the linux kernel on a mips ip32 system (an SGI O2) whith only on change in config. I changed CONFIG_BUILD_ELF64 to 'n'. Then, while rebuilding with
sgi:~# gcc -v Using built-in specs. Target: mips-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --disable-libssp --enable-checking=release mips-linux-gnu Thread model: posix gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) I got this error: CC [M] net/sched/em_u32.o CC [M] net/sched/em_meta.o net/sched/em_meta.c: In function meta_int_loadavg_0: net/sched/em_meta.c:127: error: PRINT_OPERAND, invalid operand for relocation (const:DI (plus:DI (symbol_ref:DI ("avenrun") [flags 0x40] <var_decl 0x2b357f50 avenrun>) (const_int 4 [0x4]))) net/sched/em_meta.c:127: internal compiler error: in print_operand_reloc, at config/mips/mips.c:5579 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. For Debian GNU/Linux specific bug reporting instructions, see <URL:file:///usr/share/doc/gcc-4.1/README.Bugs>. {standard input}: Assembler messages: {standard input}:2436: Warning: end of file not at end of a line; newline inserted {standard input}:2547: Warning: missing .end at end of assembly Preprocessed source stored into /tmp/cc0KjlCH.out file, please attach this to your bugreport. make[3]: *** [net/sched/em_meta.o] Error 1 make[2]: *** [net/sched] Error 2 make[1]: *** [net] Error 2 make[1]: Leaving directory `/usr/local/src/linux-2.6.23-rc3' make: *** [debian/stamp-build-kernel] Error 2 The complete command line used seems to be stored in /tmp/cc0KjlCH.out: /usr/lib/gcc/mips-linux-gnu/4.1.2/cc1 -quiet -nostdinc -Iinclude -Iinclude/asm-mips/mach-ip32 -Iinclude/asm-mips/mach-generic -D__KERNEL__ -DVMLINUX_LOAD_ADDRESS=0xffffffff80004000 -DMODULE -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(em_meta) -DKBUILD_MODNAME=KBUILD_STR(em_meta) -isystem /usr/lib/gcc/mips-linux-gnu/4.1.2/include -include include/linux/autoconf.h -MD net/sched/.em_meta.o.d net/sched/em_meta.c -quiet -dumpbase em_meta.c -mabi=64 -msym32 -mno-abicalls -msoft-float -march=r5000 -mlong-calls -auxbase-strip net/sched/.tmp_em_meta.o -g -O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-aliasing -fno-common -fno-pic -ffreestanding -fomit-frame-pointer -fno-stack-protector -o - -frandom-seed=0 When I deactivated CONFIG_BUILD_ELF64 I read that it does not work with recent binutils. My binutils version is 2.17. The only change due to this config option in Makefile seems to be: ifdef CONFIG_BUILD_ELF64 cflags-y += $(call cc-option,-mno-explicit-relocs) else cflags-y += $(call cc-option,-msym32) endif Please note that if I compile the kernel with CONFIG_BUILD_ELF64=y then gcc does not crash. The preprocessed file /tmp/cc0KjlCH.out is available at http://eppesuigoccas.homedns.org/~giuseppe/gcc-bug-mips-print_operand_reloc.out.bz2 and it about 110kb. -- Summary: internal compiler error: in print_operand_reloc, at config/mips/mips.c:5579 Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: giuseppe at eppesuigoccas dot homedns dot org GCC build triplet: mips-linux-gnu GCC host triplet: mips-linux-gnu GCC target triplet: mips-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33256