This happens while building under the T2 SDE environment, which is a framework for cross building an entire Linux distribution. GCC 4.43 Builds this OK, switching to GCC 4.5 failes while building the e2fsprogs project. I tried this with gcc 4.5.0, and the 4.5.1 latest snapshot The build host is Ubuntu 9.10 The T2 cross compiler info is: ./TOOLCHAIN/tools.cross/crosscc/mips64-t2-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=./TOOLCHAIN/tools.cross/crosscc/mips64-t2-linux-gnu-gcc COLLECT_LTO_WRAPPER=/opt/T2/t2-trunk/build/GW-Octeon-N32-8.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/crosscc/../libexec/gcc/mips64-t2-linux-gnu/4.5.1/lto-wrapper Target: mips64-t2-linux-gnu Configured with: ../configure --prefix=/opt/T2/t2-trunk/build/GW-Octeon-N32-8.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/usr --bindir=/opt/T2/t2-trunk/build/GW-Octeon-N32-8.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/usr/crosscc --sbindir=/opt/T2/t2-trunk/build/GW-Octeon-N32-8.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/usr/sbin --libdir=/opt/T2/t2-trunk/build/GW-Octeon-N32-8.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/usr/lib --datadir=/opt/T2/t2-trunk/build/GW-Octeon-N32-8.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/usr/share --includedir=/opt/T2/t2-trunk/build/GW-Octeon-N32-8.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/usr/include --infodir=/opt/T2/t2-trunk/build/GW-Octeon-N32-8.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/usr/info --mandir=/opt/T2/t2-trunk/build/GW-Octeon-N32-8.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/usr/man --sysconfdir=/opt/T2/t2-trunk/build/GW-Octeon-N32-8.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/etc --localstatedir=/opt/T2/t2-trunk/build/GW-Octeon-N32-8.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/var --disable-debug --with-libpam --with-pam --enable-libpam --enable-pam --with-mpfr=/opt/T2/t2-trunk/build/GW-Octeon-N32-8.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross --with-mpfr-lib=/opt/T2/t2-trunk/build/GW-Octeon-N32-8.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross//usr/lib --with-ppl=/opt/T2/t2-trunk/build/GW-Octeon-N32-8.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross --with-cloog=/opt/T2/t2-trunk/build/GW-Octeon-N32-8.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross --with-gmp=/opt/T2/t2-trunk/build/GW-Octeon-N32-8.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross --target=mips64-t2-linux-gnu --build=i686-nocross-linux-gnu --host=i686-nocross-linux-gnu --target=mips64-t2-linux-gnu --with-arch=octeon --with-arch=octeon --enable-__cxa_atexit --disable-checking --disable-bootstrap --disable-libstdcxx-pch --disable-multilib --with-sysroot=/opt/T2/t2-trunk/build/GW-Octeon-N32-8.0-trunk-generic-mips64-EB-octeon-cross-linux --program-prefix=mips64-t2-linux-gnu- --disable-cpp --disable-shared --disable-libssp --disable-libgomp --enable-languages=c,c++ --disable-libmudflap Thread model: posix gcc version 4.5.1 20100429 (prerelease) (GCC) -------------------------------------------------------- Error: GEN32TABLE crc32table.h CC crc32.c mips64-t2-linux-gnu-gcc: warning: -pipe ignored because -save-temps specified recovery.c: In function 'do_one_pass': recovery.c:713:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. make[2]: *** [recovery.o] Error 1 make[2]: Leaving directory `/opt/T2/t2-trunk/src.e2fsprogs.GW-Octeon-N32.20100505.150534.13957.ubuntu1/e2fsprogs-1.41.11/e2fsck' make[1]: *** [all-progs-recursive] Error 1 make[1]: Leaving directory `/opt/T2/t2-trunk/src.e2fsprogs.GW-Octeon-N32.20100505.150534.13957.ubuntu1/e2fsprogs-1.41.11' make: *** [all] Error 2 Due to previous errors, no 1-e2fsprogs.log file! ------------------------------------------------------------------ I don't see a way to attach the crc32.i file from this screen, I will see if I can do it later.
Created attachment 20568 [details] The .i file
Can you provide the full command line to compile crc32.c ?
Created attachment 20569 [details] crc32 build output (verbose)
That last attachment with the build command was a mess, I re ran the build without the -v for gcc, but added a V=1 to the makefile, and got something a little cleaner: ---------------------------------------------------------------------------- mips64-t2-linux-gnu-gcc -c -I../lib -I../lib -DLOCALEDIR=\"/usr/share/locale\" -DROOT_SYSCONFDIR=\"/etc\" -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_DLOPEN=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DENABLE_HTREE=1 -DCONFIG_TESTIO_DEBUG=1 -DTLS=__thread -DPACKAGE=\"e2fsprogs\" -DVERSION=\"0.14.1\" -DHAVE_LONG_LONG=1 -DHAVE_LONG_DOUBLE=1 -DHAVE_WCHAR_T=1 -DHAVE_WINT_T=1 -DHAVE_INTTYPES_H_WITH_UINTMAX=1 -DHAVE_STDINT_H_WITH_UINTMAX=1 -DHAVE_INTMAX_T=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1 -DHAVE_FCHOWN=1 -DHAVE_MALLINFO=1 -DHAVE_FDATASYNC=1 -DHAVE_STRNLEN=1 -DHAVE_STRPTIME=1 -DHAVE_STRDUP=1 -DHAVE_SYSCONF=1 -DHAVE_PATHCONF=1 -DHAVE_POSIX_MEMALIGN=1 -DHAVE_MEMALIGN=1 -DHAVE_VALLOC=1 -DHAVE___SECURE_GETENV=1 -DHAVE_PRCTL=1 -DHAVE_MMAP=1 -DHAVE_UTIME=1 -DHAVE_SETRESUID=1 -DHAVE_SETRESGID=1 -DHAVE_USLEEP=1 -DHAVE_NANOSLEEP=1 -DHAVE_GETDTABLESIZE=1 -DHAVE_GETRLIMIT=1 -DHAVE_BLKID_PROBE_GET_TOPOLOGY=1 -DHAVE_SEM_INIT=1 -DHAVE_EXT2_IOCTLS=1 -g -O2 -DRESOURCE_TRACK -I. crc32.c -o crc32.o mips64-t2-linux-gnu-gcc: warning: -pipe ignored because -save-temps specified mips64-t2-linux-gnu-gcc: warning: -pipe ignored because -save-temps specified recovery.c: In function 'do_one_pass': recovery.c:713:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. make[2]: *** [recovery.o] Error 1 make[2]: Leaving directory `/opt/T2/t2-trunk/src.e2fsprogs.GW-Octeon-N32.20100505.164533.4511.ubuntu1/e2fsprogs-1.41.11/e2fsck' make[1]: *** [all-progs-recursive] Error 1 make[1]: Leaving directory `/opt/T2/t2-trunk/src.e2fsprogs.GW-Octeon-N32.20100505.164533.4511.ubuntu1/e2fsprogs-1.41.11' make: *** [all] Error 2 ----------------------------------------------------------------------------
Can you attach recovery.i ?
Created attachment 20570 [details] recovery.i file
I can confirm similar problem under openwrt buildroot environment (trunk r22177) with gcc 4.5.0. The build host is Debian testing, 2.6.32-trunk-686. reproduced with: staging_dir/toolchain-mips_r2_gcc-4.5.0_uClibc-0.9.31/usr/bin/mips-openwrt-linux-uclibc-gcc -c -O2 -mips32r2 -mtune=mips32r2 -fpic recovery.i -v Using built-in specs. COLLECT_GCC=/home/w/src/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5.0_uClibc-0.9.31/usr/bin/mips-openwrt-linux-uclibc-gcc COLLECT_LTO_WRAPPER=/home/w/src/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5.0_uClibc-0.9.31/usr/libexec/gcc/mips-openwrt-linux-uclibc/4.5.0/lto-wrapper Target: mips-openwrt-linux-uclibc Configured with: /home/w/src/openwrt/trunk/build_dir/toolchain-mips_r2_gcc-4.5.0_uClibc-0.9.31/gcc-4.5.0/configure --prefix=/home/w/src/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5.0_uClibc-0.9.31/usr --build=i486-linux-gnu --host=i486-linux-gnu --target=mips-openwrt-linux-uclibc --with-gnu-ld --enable-target-optspace --disable-libgomp --disable-libmudflap --disable-multilib --disable-nls --with-host-libstdcxx=-lstdc++ --with-float=soft --with-gmp=/home/w/src/openwrt/trunk/staging_dir/host --with-mpfr=/home/w/src/openwrt/trunk/staging_dir/host --disable-decimal-float --with-gmp=/home/w/src/openwrt/trunk/staging_dir/host --with-mpc=/home/w/src/openwrt/trunk/staging_dir/host --with-mpfr=/home/w/src/openwrt/trunk/staging_dir/host --disable-decimal-float --disable-libssp --disable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-threads --with-slibdir=/home/w/src/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5.0_uClibc-0.9.31/lib --enable-lto --with-libelf=/home/w/src/openwrt/trunk/staging_dir/host --disable-tls Thread model: posix gcc version 4.5.0 (GCC) COLLECT_GCC_OPTIONS='-c' '-O2' '-mips32r2' '-mtune=mips32r2' '-fpic' '-v' '-msoft-float' '-mllsc' '-mno-synci' /home/w/src/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5.0_uClibc-0.9.31/usr/libexec/gcc/mips-openwrt-linux-uclibc/4.5.0/cc1 -fpreprocessed recovery.i -quiet -dumpbase recovery.i -mips32r2 -mtune=mips32r2 -msoft-float -mllsc -mno-synci -auxbase recovery -O2 -version -fpic -o /tmp/cc0cB1Gx.s GNU C (GCC) version 4.5.0 (mips-openwrt-linux-uclibc) compiled by GNU C version 4.4.4, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU C (GCC) version 4.5.0 (mips-openwrt-linux-uclibc) compiled by GNU C version 4.4.4, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 14a39be08080cfbd5f8220cfad9b033e mips-openwrt-linux-uclibc-gcc: Internal error: Segmentation fault (program cc1) Please submit a full bug report. See <https://dev.openwrt.org/> for instructions.
Created attachment 21197 [details] recovery.i file (openwrt)
*** Bug 44944 has been marked as a duplicate of this bug. ***
Author: rsandifo Date: Sun May 29 17:41:50 2011 New Revision: 174402 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174402 Log: gcc/ PR target/43995 * config/mips/mips.c (mips_pic_call_symbol_from_set): Add a recurse_p argument. Only follow register copies if it is set, and prevent mips_find_pic_call_symbol from recursing. (mips_find_pic_call_symbol): Add a recurse_p argument. Pass it to mips_pic_call_symbol_from_set. (mips_annotate_pic_calls): Update accordingly. Modified: trunk/gcc/ChangeLog trunk/gcc/config/mips/mips.c
Author: rsandifo Date: Sun May 29 17:47:51 2011 New Revision: 174404 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174404 Log: gcc/ PR target/43995 * config/mips/mips.c (mips_pic_call_symbol_from_set): Add a recurse_p argument. Only follow register copies if it is set, and prevent mips_find_pic_call_symbol from recursing. (mips_find_pic_call_symbol): Add a recurse_p argument. Pass it to mips_pic_call_symbol_from_set. (mips_annotate_pic_calls): Update accordingly. Modified: branches/gcc-4_6-branch/gcc/ChangeLog branches/gcc-4_6-branch/gcc/config/mips/mips.c
Author: rsandifo Date: Sun May 29 17:50:53 2011 New Revision: 174407 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174407 Log: gcc/ PR target/43995 * config/mips/mips.c (mips_pic_call_symbol_from_set): Add a recurse_p argument. Only follow register copies if it is set, and prevent mips_find_pic_call_symbol from recursing. (mips_find_pic_call_symbol): Add a recurse_p argument. Pass it to mips_pic_call_symbol_from_set. (mips_annotate_pic_calls): Update accordingly. Modified: branches/gcc-4_5-branch/gcc/ChangeLog branches/gcc-4_5-branch/gcc/config/mips/mips.c
Patch applied to trunk, 4.5 and 4.6.