From mboxrd@z Thu Jan 1 00:00:00 1970 From: chronos_tachyon@mail.com To: gcc-gnats@gcc.gnu.org Subject: bootstrap/3847: GCC 3.0 SEGVs while bootstrapping (-fexceptions only) Date: Fri, 27 Jul 2001 12:26:00 -0000 Message-id: <200107271917.f6RJHWE00801@chronos.dyndns.org> X-SW-Source: 2001-07/msg00741.html List-Id: >Number: 3847 >Category: bootstrap >Synopsis: GCC 3.0 SEGVs while bootstrapping (-fexceptions only) >Confidential: no >Severity: critical >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Fri Jul 27 12:26:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Chronos Tachyon >Release: 3.0 >Organization: n/a >Environment: System: Linux chronos 2.4.5 #1 Mon Jun 18 20:06:52 CDT 2001 i586 unknown Architecture: i586 Machine is a 300MHz AMD K6-2, with 512MB SDRAM Kernel is Linux 2.4.5 Distribution is Slackware 7.0, heavily customized C Library is GLIBC 2.2.3 host: i386-pc-linux-gnu build: i386-pc-linux-gnu target: i386-pc-linux-gnu configured with: ../gcc-3.0/configure --prefix=/usr/pkg/gcc-3.0 --host=i386-pc-linux --with-gnu-as --with-gnu-ld --enable-languages=c >Description: I compiled a C-only, bootstrap version of GCC 3.0, then attempted to move on and produce a full version with all languages enabled. The xgcc bootstrap compiler bombed out with a Segmentation fault. Details from "gcc -v": Specs: /usr/pkg/gcc-3.0/lib/gcc-lib/i386-pc-linux/3.0/specs Thread model: single gcc version 3.0 >How-To-Repeat: I attempted to build GCC 3.0 using the following configure command: export CFLAGS="-O2 -fomit-frame-pointer -march=486 -mcpu=pentium" ../gcc-3.0/configure --prefix=/usr/pkg/gcc-3.0 --host=i386-pc-linux \ --with-gnu-ld --with-gnu-as --enable-threads=posix However, about an hour into the build process, xgcc bombed out: [In directory: /gcc] /gcc/xgcc -B/gcc/ \ -B/usr/pkg/gcc-3.0/i386-pc-linux/bin/ \ -B/usr/pkg/gcc-3.0/i386-pc-linux/lib/ \ -isystem /usr/pkg/gcc-3.0/i386-pc-linux/include \ -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes \ -Wmissing-prototypes -isystem ./include -fPIC -g1 \ -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \ -I. -I. -I/gcc -I/gcc/. \ -I/gcc/config -I/gcc/../include -fexceptions \ -c /gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o [Snip four irrelevant warning messages] /gcc/unwind-dw2.c: At top level: /gcc/unwind-dw2.c:1123: Internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. I tried trimming command line options until the file compiled successfully, and -fexceptions was determined to be the culprit. I suspected that the xgcc bootstrap compiler did not have exception support for some reason, then SEGV-ed when it encountered any files compiled with "-fexceptions". Replacing -fexceptions with -fno-exceptions in the proper Makefile fragment allowed unwind-dw2*.c to compile without incident, although I did not bother trying to progress further in this state. Clearing out the build directory and reconfiguring the compiler with the undocumented --enable-sjlj-exceptions flag improved the situation, but libstdc++ still bombed out without completing. Here is the command where it fails: [In directory: /i386-pc-linux/libstdc++-v3/libsupc++] /gcc/xgcc -B/gcc/ -nostdinc++ \ -L/i386-pc-linux/libstdc++-v3/src -L/i386-pc-linux/libstdc++-v3/src/.libs -B/usr/pkg/gcc-3.0/i386-pc-linux/bin/ \ -B/usr/pkg/gcc-3.0/i386-pc-linux/lib/ \ -isystem /usr/pkg/gcc-3.0/i386-pc-linux/include \ -I/libstdc++-v3/../gcc \ -I/libstdc++-v3/../include \ -I/libstdc++-v3/include \ -I/libstdc++-v3/include/std \ -I/libstdc++-v3/include/c_std \ -I../include -I/libstdc++-v3/libsupc++ \ -g -O2 -D_GNU_SOURCE -fno-implicit-templates -Wall \ -Wno-format -W -Wwrite-strings -Winline \ -fdiagnostics-show-location=once -ffunction-sections \ -fdata-sections -g \ -c /libstdc++-v3/libsupc++/eh_personality.cc \ -fPIC -DPIC -o eh_personality.o /libstdc++-v3/libsupc++/eh_personality.cc: In function `void __cxa_call_unexpected(_Unwind_Exception*)': /libstdc++-v3/libsupc++/eh_personality.cc:403: warning: new declaration `void __cxa_call_unexpected(_Unwind_Exception*)' /libstdc++-v3/libsupc++/eh_personality.cc:403: warning: ambiguates built-in declaration `void __cxa_call_unexpected(void*)' /libstdc++-v3/libsupc++/eh_personality.cc: In function `void __cxa_call_unexpected(_Unwind_Exception*)': /libstdc++-v3/libsupc++/eh_personality.cc:443: Internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. >Fix: None that I am aware of. >Release-Note: >Audit-Trail: >Unformatted: