This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
bootstrap/3847: GCC 3.0 SEGVs while bootstrapping (-fexceptions only)
- To: gcc-gnats at gcc dot gnu dot org
- Subject: bootstrap/3847: GCC 3.0 SEGVs while bootstrapping (-fexceptions only)
- From: chronos_tachyon at mail dot com
- Date: Fri, 27 Jul 2001 14:17:32 -0500
>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: <build>/gcc]
<build>/gcc/xgcc -B<build>/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<source>/gcc -I<source>/gcc/. \
-I<source>/gcc/config -I<source>/gcc/../include -fexceptions \
-c <source>/gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o
[Snip four irrelevant warning messages]
<source>/gcc/unwind-dw2.c: At top level:
<source>/gcc/unwind-dw2.c:1123: Internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> 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: <build>/i386-pc-linux/libstdc++-v3/libsupc++]
<build>/gcc/xgcc -B<build>/gcc/ -nostdinc++ \
-L<build>/i386-pc-linux/libstdc++-v3/src
-L<build>/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<source>/libstdc++-v3/../gcc \
-I<source>/libstdc++-v3/../include \
-I<source>/libstdc++-v3/include \
-I<source>/libstdc++-v3/include/std \
-I<source>/libstdc++-v3/include/c_std \
-I../include -I<source>/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 <source>/libstdc++-v3/libsupc++/eh_personality.cc \
-fPIC -DPIC -o eh_personality.o
<source>/libstdc++-v3/libsupc++/eh_personality.cc: In function `void __cxa_call_unexpected(_Unwind_Exception*)':
<source>/libstdc++-v3/libsupc++/eh_personality.cc:403: warning: new declaration `void __cxa_call_unexpected(_Unwind_Exception*)'
<source>/libstdc++-v3/libsupc++/eh_personality.cc:403: warning: ambiguates built-in declaration `void __cxa_call_unexpected(void*)'
<source>/libstdc++-v3/libsupc++/eh_personality.cc: In function `void __cxa_call_unexpected(_Unwind_Exception*)':
<source>/libstdc++-v3/libsupc++/eh_personality.cc:443: Internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
>Fix:
None that I am aware of.
>Release-Note:
>Audit-Trail:
>Unformatted: