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

--- Comment #169 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
(In reply to John Paul Adrian Glaubitz from comment #168)
> I am getting a segmentation fault when building libgcc2.c now:
> 
> /<<PKGBUILDDIR>>/build/./gcc/xgcc -B/<<PKGBUILDDIR>>/build/./gcc/
> -B/usr/sh4-linux-gnu/bin/ -B/usr/sh4-linux-gnu/lib/ -isystem
> /usr/sh4-linux-gnu/include -isystem /usr/sh4-linux-gnu/sys-include -isystem
> /<<PKGBUILDDIR>>/build/sys-include   -fno-checking -g -O2 -O2  -g -O2
> -DIN_GCC   -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual
> -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem
> ./include  -fpic -DNO_FPSCR_VALUES -w -Wno-sync-nand -g -DIN_LIBGCC2
> -fbuilding-libgcc -fno-stack-protector  -fpic -DNO_FPSCR_VALUES -w
> -Wno-sync-nand -I. -I. -I../.././gcc -I../../../src/libgcc
> -I../../../src/libgcc/. -I../../../src/libgcc/../gcc
> -I../../../src/libgcc/../include  -DHAVE_CC_TLS   -o __gcc_bcmp.o -MT
> __gcc_bcmp.o -MD -MP -MF __gcc_bcmp.dep -DL__gcc_bcmp -c
> ../../../src/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
> during GIMPLE pass: evrp
> ../../../src/libgcc/libgcc2.c: In function '__clrsbsi2':
> ../../../src/libgcc/libgcc2.c:760:1: internal compiler error: Segmentation
> fault
>   760 | }
>       | ^
>...
> make[5]: *** [Makefile:508: _clrsbsi2.o] Error 1
> make[5]: *** Waiting for unfinished jobs....
> make[5]: Leaving directory '/<<PKGBUILDDIR>>/build/sh4-linux-gnu/libgcc'
> make[4]: *** [Makefile:18852: all-stage2-target-libgcc] Error 2
> make[4]: Leaving directory '/<<PKGBUILDDIR>>/build'
> make[3]: *** [Makefile:24459: stage2-bubble] Error 2
> make[3]: Leaving directory '/<<PKGBUILDDIR>>/build'
> make[2]: *** [Makefile:24663: bootstrap] Error 2
> make[2]: Leaving directory '/<<PKGBUILDDIR>>/build'

It seems that the stage2 compiler segfaults when building stage2 libgcc. There
is some wrong code issue with the stage1 compiler. I can't look into it
directly with the cross compiler.
I'll try running gcc testsuite with the sh-elf cross compiler on old sh-sim. 
There may not be much chance, but it might catch the wrong code bug.

Of course, you can investigate that segfault directly or run gcc testsuite
natively with the stage1 compiler to find the wrong code.

> Trying with gcc-15 now.

Hope it gives us more information.

Reply via email to