Bug 56308 - GCC 4.8 segfaults when building GCC 4.7
Summary: GCC 4.8 segfaults when building GCC 4.7
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-13 18:00 UTC by Cosimo Cecchi
Modified: 2013-02-13 18:14 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cosimo Cecchi 2013-02-13 18:00:16 UTC
I'm trying to build an Yocto base system (shipping GCC 4.7.2) on my Fedora Rawhide system, which currently ships GCC 4.8.0.
GCC 4.8.0 will fail with an internal compiler error while attempting that.
Please let mw know if you need further information.

Some info:

$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.0/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-isl=/builddir/build/BUILD/gcc-4.8.0-20130211/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.0-20130211/obj-x86_64-redhat-linux/cloog-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.0 20130211 (Red Hat 4.8.0-0.11) (GCC)

Log of the failure:

| /home/cosimoc/Sources/ostree/build/ostbuild/build-yocto-x86_64/tmp-eglibc/work/x86_64-gnomeos-linux/gcc-cross-initial-4.7.2-r13/gcc-4.7.2/build.x86_64-linux.x86_64-gnomeos-linux/./gcc/xgcc -B/home/cosimoc/Sources/ostree/build/ostbuild/build-yocto-x86_64/tmp-eglibc/work/x86_64-gnomeos-linux/gcc-cross-initial-4.7.2-r13/gcc-4.7.2/build.x86_64-linux.x86_64-gnomeos-linux/./gcc/ -m64 -isystem/home/cosimoc/Sources/ostree/build/ostbuild/build-yocto-x86_64/tmp-eglibc/sysroots/qemux86-64/usr/include -B/home/cosimoc/Sources/ostree/build/ostbuild/build-yocto-x86_64/tmp-eglibc/sysroots/x86_64-linux/usr/x86_64-gnomeos-linux/bin/ -B/home/cosimoc/Sources/ostree/build/ostbuild/build-yocto-x86_64/tmp-eglibc/sysroots/x86_64-linux/usr/x86_64-gnomeos-linux/lib/ -isystem /home/cosimoc/Sources/ostree/build/ostbuild/build-yocto-x86_64/tmp-eglibc/sysroots/x86_64-linux/usr/x86_64-gnomeos-linux/include -isystem /home/cosimoc/Sources/ostree/build/ostbuild/build-yocto-x86_64/tmp-eglibc/sysroots/x86_64-linux/usr/x86_64-gnomeos-linux/sys-include --sysroot=/home/cosimoc/Sources/ostree/build/ostbuild/build-yocto-x86_64/tmp-eglibc/work/x86_64-gnomeos-linux/gcc-cross-initial-4.7.2-r13/gcc-4.7.2/build.x86_64-linux.x86_64-gnomeos-linux/tmpsysroot   -g -Os -O2  -g -Os -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -fpic -I. -I. -I../.././gcc -I/home/cosimoc/Sources/ostree/build/ostbuild/build-yocto-x86_64/tmp-eglibc/work-shared/gcc-4.7.2-r13/gcc-4.7.2/libgcc -I/home/cosimoc/Sources/ostree/build/ostbuild/build-yocto-x86_64/tmp-eglibc/work-shared/gcc-4.7.2-r13/gcc-4.7.2/libgcc/. -I/home/cosimoc/Sources/ostree/build/ostbuild/build-yocto-x86_64/tmp-eglibc/work-shared/gcc-4.7.2-r13/gcc-4.7.2/libgcc/../gcc -I/home/cosimoc/Sources/ostree/build/ostbuild/build-yocto-x86_64/tmp-eglibc/work-shared/gcc-4.7.2-r13/gcc-4.7.2/libgcc/../include  -DHAVE_CC_TLS  -DUSE_TLS -o _trampoline.o -MT _trampoline.o -MD -MP -MF _trampoline.dep -DL_trampoline -c /home/cosimoc/Sources/ostree/build/ostbuild/build-yocto-x86_64/tmp-eglibc/work-shared/gcc-4.7.2-r13/gcc-4.7.2/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
| /home/cosimoc/Sources/ostree/build/ostbuild/build-yocto-x86_64/tmp-eglibc/work-shared/gcc-4.7.2-r13/gcc-4.7.2/libgcc/libgcc2.c: In function '__cmpti2':
| /home/cosimoc/Sources/ostree/build/ostbuild/build-yocto-x86_64/tmp-eglibc/work-shared/gcc-4.7.2-r13/gcc-4.7.2/libgcc/libgcc2.c:1200: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[1]: *** [_cmpdi2.o] Error 1
| make[1]: *** Waiting for unfinished jobs....
| /home/cosimoc/Sources/ostree/build/ostbuild/build-yocto-x86_64/tmp-eglibc/work-shared/gcc-4.7.2-r13/gcc-4.7.2/libgcc/libgcc2.c: In function '__ucmpti2':
| /home/cosimoc/Sources/ostree/build/ostbuild/build-yocto-x86_64/tmp-eglibc/work-shared/gcc-4.7.2-r13/gcc-4.7.2/libgcc/libgcc2.c:1219: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[1]: *** [_ucmpdi2.o] Error 1
| make[1]: Leaving directory `/home/cosimoc/Sources/ostree/build/ostbuild/build-yocto-x86_64/tmp-eglibc/work/x86_64-gnomeos-linux/gcc-cross-initial-4.7.2-r13/gcc-4.7.2/build.x86_64-linux.x86_64-gnomeos-linux/x86_64-gnomeos-linux/libgcc'
| make: *** [all-target-libgcc] Error 2
| ERROR: oe_runmake failed
Comment 1 Jakub Jelinek 2013-02-13 18:14:34 UTC
If it is 4.7.2 release, as opposed to newer snapshot from the 4.7 branch,
you need the http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191605 fix.
This will be included in 4.7.3.  Or build with -fno-aggressive-loop-optimizations.