Config.in: add -Ofast option
authorJoshua Henderson <joshua.henderson@microchip.com>
Mon, 26 Mar 2018 19:34:05 +0000 (12:34 -0700)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 26 Mar 2018 20:19:11 +0000 (22:19 +0200)
-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>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Config.in
package/Makefile.in

index 0002df51767f52d8b9aef3a295fefcde5ade080e..037ea2265b76e7cb5e6ac89ca7ef4c594148f3a3 100644 (file)
--- a/Config.in
+++ b/Config.in
@@ -527,6 +527,17 @@ config BR2_OPTIMIZE_S
          -ftree-vect-loop-version
          This is the default.
 
+config BR2_OPTIMIZE_FAST
+       bool "optimize for fast"
+       depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
+       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
index e387ce67feebf93272393a80a69e380b1d6aa369..828e12e7d79451e7af9eccb0a1dd8b977480ce3b 100644 (file)
@@ -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