This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Call GNU ld with -O*
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Marc Glisse <marc dot glisse at inria dot fr>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 12 Jul 2013 17:27:23 +0200
- Subject: Re: Call GNU ld with -O*
- References: <alpine dot DEB dot 2 dot 02 dot 1307121633360 dot 28978 at stedding dot saclay dot inria dot fr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Jul 12, 2013 at 04:54:21PM +0200, Marc Glisse wrote:
> +/* GNU ld has -O1 and gold -O2, but we only pass it with -O3, -Os or -Ofast. */
> +#ifndef LINK_OPT_SPEC
> +#if HAVE_GNU_LD
> +#define LINK_OPT_SPEC "%{O*:%{!O0:%{!O1:%{!O2:%{!Og:%{!O:-O2}}}}}} "
Wouldn't something like "%{O*:%{O|O0|O1|O2|Og:;:-O2}}" work?
Jakub