This patch is aimed at removing bogus .eh_frame info emitted after the zero terminator in crtend.o, which will cause a ld warning and slow exception handling. The right fix for the PR is probably to change libgcc/Makefile.in to always supply -fno-asynchronous-unwind-tables when building crtbegin.o and crtend.o, since the utility of such unwind info is limited to say the least; To what handler would you be unwinding to?
This patch instead carries on in the tradition of pr31868 and pr80037, and just fixes the problem for powerpc.. alpha, i386, s390, tilepro, tilegx already disable unwind info for these files. Bootstrapped and regression tested powerpc64le-linux. OK for master and gcc-8? PR libgcc/85532 * config/rs6000/t-crtstuff (CRTSTUFF_T_CFLAGS): Add -fno-asynchronous-unwind-tables. diff --git a/libgcc/config/rs6000/t-crtstuff b/libgcc/config/rs6000/t-crtstuff index 0b2601b..d5ff959 100644 --- a/libgcc/config/rs6000/t-crtstuff +++ b/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 +CRTSTUFF_T_CFLAGS = -msdata=none -O2 -fno-asynchronous-unwind-tables -- Alan Modra Australia Development Lab, IBM