I think this one counts as obvious, but I'll ask for permission anyway.
Bootstrapped etc. powerpc-linux. OK everywhere?
PR target/45053
* config/rs6000/t-crtstuff (CRTSTUFF_T_CFLAGS): Add -O2.
Index: libgcc/config/rs6000/t-crtstuff
===================================================================
--- libgcc/config/rs6000/t-crtstuff (revision 195839)
+++ libgcc/config/rs6000/t-crtstuff (working copy)
@@ -1,3 +1,6 @@
# If .sdata is enabled __CTOR_{LIST,END}__ go into .sdata instead of
# .ctors.
-CRTSTUFF_T_CFLAGS = -msdata=none
+# 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.
+CRTSTUFF_T_CFLAGS = -msdata=none -O2
--
Alan Modra
Australia Development Lab, IBM