From: Alan Modra Date: Fri, 7 Apr 2017 02:19:19 +0000 (+0930) Subject: [RS6000] Out-of-line register save functions can't be used from crtend.o X-Git-Tag: releases/gcc-5.5.0~420 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=317c258cc7449e9baf557a9e911041b6f552d11b;p=thirdparty%2Fgcc.git [RS6000] Out-of-line register save functions can't be used from crtend.o PR target/45053 * config/rs6000/t-crtstuff (CRTSTUFF_T_CFLAGS): Add -O2. From-SVN: r246751 --- diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 49c7bd8a2fa0..4c7b8c2654da 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2017-04-07 Alan Modra + + PR target/45053 + * config/rs6000/t-crtstuff (CRTSTUFF_T_CFLAGS): Add -O2. + 2017-01-09 Andreas Tobler Backport from mainline diff --git a/libgcc/config/rs6000/t-crtstuff b/libgcc/config/rs6000/t-crtstuff index 7422d383754e..0b2601b05bdd 100644 --- a/libgcc/config/rs6000/t-crtstuff +++ b/libgcc/config/rs6000/t-crtstuff @@ -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. See PR45053. +CRTSTUFF_T_CFLAGS = -msdata=none -O2