Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] Config.in: add -Ofast option
@ 2018-03-22 16:26 Joshua Henderson
  2018-03-25  8:24 ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Joshua Henderson @ 2018-03-22 16:26 UTC (permalink / raw)
  To: buildroot

-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"
+	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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-26 16:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-22 16:26 [Buildroot] [PATCH] Config.in: add -Ofast option Joshua Henderson
2018-03-25  8:24 ` Yann E. MORIN
2018-03-25 20:40   ` Thomas Petazzoni
2018-03-26 16:12     ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox