All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] Config.in: add -Ofast option
Date: Sun, 25 Mar 2018 10:24:34 +0200	[thread overview]
Message-ID: <20180325082434.GF2620@scaer> (raw)
In-Reply-To: <1521735971-22210-1-git-send-email-joshua.henderson@microchip.com>

Joshua, All,

On 2018-03-22 09:26 -0700, Joshua Henderson spake thusly:
> -Ofast (introduced in GCC 4.6) It combines the existing optimization level -O3
> with options that can affect standards compliance but result in better optimized
> code. For example, -Ofast enables -ffast-math.
> 
> Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com>
> ---
>  Config.in           | 9 +++++++++
>  package/Makefile.in | 3 +++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/Config.in b/Config.in
> index 0002df5..e83ce02 100644
> --- a/Config.in
> +++ b/Config.in
> @@ -527,6 +527,15 @@ config BR2_OPTIMIZE_S
>  	  -ftree-vect-loop-version
>  	  This is the default.
>  
> +config BR2_OPTIMIZE_FAST
> +	bool "optimize for fast"

-Ofast was introduced in gcc-4.6, so you need a dependency:
    depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6

Otherwise I'm fine with this.

Regards,
Yann E. MORIN.

> +	help
> +	  Optimize for fast. Disregard strict standards compliance. -Ofast
> +	  enables all -O3 optimizations. It also enables optimizations that are
> +	  not valid for all standard-compliant programs. It turns on -ffast-math
> +	  and the Fortran-specific -fstack-arrays, unless -fmax-stack-var-size
> +	  is specified, and -fno-protect-parens.
> +
>  endchoice
>  
>  config BR2_GOOGLE_BREAKPAD_ENABLE
> diff --git a/package/Makefile.in b/package/Makefile.in
> index e387ce6..828e12e 100644
> --- a/package/Makefile.in
> +++ b/package/Makefile.in
> @@ -128,6 +128,9 @@ endif
>  ifeq ($(BR2_OPTIMIZE_S),y)
>  TARGET_OPTIMIZATION = -Os
>  endif
> +ifeq ($(BR2_OPTIMIZE_FAST),y)
> +TARGET_OPTIMIZATION = -Ofast
> +endif
>  ifeq ($(BR2_DEBUG_1),y)
>  TARGET_DEBUGGING = -g1
>  endif
> -- 
> 2.7.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2018-03-25  8:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-22 16:26 [Buildroot] [PATCH] Config.in: add -Ofast option Joshua Henderson
2018-03-25  8:24 ` Yann E. MORIN [this message]
2018-03-25 20:40   ` Thomas Petazzoni
2018-03-26 16:12     ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180325082434.GF2620@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.