This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RS6000] Fix PR45053

On Thu, Feb 7, 2013 at 9:45 AM, Alan Modra <> wrote:
> I think this one counts as obvious, but I'll ask for permission anyway.
> Bootstrapped etc. powerpc-linux.  OK everywhere?

Isn't there a way to just disable the out-of-line register save/restore
functions?  Adding -O2 looks odd.

On a related note I see the ppc backend uses optimize_size almost
everywhere instead of optimize_function_for_size_p () or
optimize_insn_for_size_p ().
It seems only the i386 backend was properly transitioned here ...


>         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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]