[Bug bootstrap/89494] Bootstrap error when using GCC 4.2.1

pkubaj at anongoth dot pl gcc-bugzilla@gcc.gnu.org
Sat Apr 10 17:03:20 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89494

--- Comment #30 from Piotr Kubaj <pkubaj at anongoth dot pl> ---
With default flags:
during RTL pass: cprop_hardreg
In file included from
/wrkdirs/usr/ports/lang/gcc10-devel/work/gcc-10-20210327/libgcc/unwind-c.c:32:
/wrkdirs/usr/ports/lang/gcc10-devel/work/gcc-10-20210327/libgcc/unwind-pe.h: In
function 'base_of_encoded_value':
/wrkdirs/usr/ports/lang/gcc10-devel/work/gcc-10-20210327/libgcc/unwind-pe.h:121:1:
internal compiler error: Segmentation fault

With my hack that allows gcc9 to build:
during RTL pass: reload
In file included from
/wrkdirs/usr/ports/lang/gcc10-devel/work/gcc-10-20210327/libiberty/regex.c:639:
/wrkdirs/usr/ports/lang/gcc10-devel/work/gcc-10-20210327/libiberty/regex.c: In
function 'byte_regex_compile':
/wrkdirs/usr/ports/lang/gcc10-devel/work/gcc-10-20210327/libiberty/regex.c:4223:1:
internal compiler error: Segmentation fault
 4223 | } /* regex_compile */

The hack is:
CFLAGS_FOR_TARGET="-O0" CXXFLAGS_FOR_TARGET="-O0" BOOT_CFLAGS="-O0"
And the patch:
--- libgcc/config/rs6000/t-crtstuff.orig        2020-04-07 15:17:50 UTC
+++ libgcc/config/rs6000/t-crtstuff
@@ -3,4 +3,4 @@
 # Do not build crtend.o with -Os as that can result in references to
 # out-of-line register save/restore functions, which may be unresolved
 # as crtend.o is linked after libgcc.a.  See PR45053.
-CRTSTUFF_T_CFLAGS = -msdata=none -O2 -fno-asynchronous-unwind-tables
+CRTSTUFF_T_CFLAGS = -msdata=none -O0 -fno-asynchronous-unwind-tables


More information about the Gcc-bugs mailing list