All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add option to build with -O3
@ 2014-03-05  0:01 Jon Ringle
  2014-03-05  5:09 ` Greg KH
  0 siblings, 1 reply; 16+ messages in thread
From: Jon Ringle @ 2014-03-05  0:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jon Ringle

Signed-off-by: Jon Ringle <jringle@gridpoint.com>
---
 Makefile     |  2 ++
 init/Kconfig | 19 ++++++++++++++++---
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 78209ee..e7f0b3c 100644
--- a/Makefile
+++ b/Makefile
@@ -581,6 +581,8 @@ all: vmlinux

 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
 KBUILD_CFLAGS  += -Os $(call cc-disable-warning,maybe-uninitialized,)
+else ifdef CONFIG_CC_OPTIMIZE_FOR_SPEED
+KBUILD_CFLAGS   += -O3
 else
 KBUILD_CFLAGS  += -O2
 endif
diff --git a/init/Kconfig b/init/Kconfig
index 009a797..17d4c62 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1233,13 +1233,26 @@ source "usr/Kconfig"

 endif

+choice
+    prompt "Optimize"
+
+config CC_OPTIMIZE_NORMAL
+    bool "Optimize Normal (-O2)"
+    help
+      Enabling this option will pass "-O2" to gcc
 config CC_OPTIMIZE_FOR_SIZE
-       bool "Optimize for size"
+       bool "Optimize for size (-Os)"
        help
-         Enabling this option will pass "-Os" instead of "-O2" to gcc
+         Enabling this option will pass "-Os" to gcc
          resulting in a smaller kernel.

-         If unsure, say N.
+config CC_OPTIMIZE_FOR_SPEED
+    bool "Optimze for speed (-O3)"
+    help
+      Enabling this option will pass "-O3" to gcc
+      resulting in a larger kernel (but possibly faster)
+
+endchoice

 config SYSCTL
        bool
--
1.8.5.4


The information contained in this transmission may contain confidential information.  If the reader of this message is not the intended recipient, you are hereby notified that any review, dissemination, distribution or duplication of this communication is strictly prohibited.  If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.

^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [PATCH] Add option to build with -O3
@ 2014-03-05  7:36 jon
  2014-03-06 12:28 ` Austin S Hemmelgarn
  0 siblings, 1 reply; 16+ messages in thread
From: jon @ 2014-03-05  7:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jon Ringle

From: Jon Ringle <jringle@gridpoint.com>

Signed-off-by: Jon Ringle <jringle@gridpoint.com>
---
 Makefile     |  2 ++
 init/Kconfig | 19 ++++++++++++++++---
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 78209ee..e7f0b3c 100644
--- a/Makefile
+++ b/Makefile
@@ -581,6 +581,8 @@ all: vmlinux
 
 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
 KBUILD_CFLAGS	+= -Os $(call cc-disable-warning,maybe-uninitialized,)
+else ifdef CONFIG_CC_OPTIMIZE_FOR_SPEED
+KBUILD_CFLAGS   += -O3
 else
 KBUILD_CFLAGS	+= -O2
 endif
diff --git a/init/Kconfig b/init/Kconfig
index 009a797..17d4c62 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1233,13 +1233,26 @@ source "usr/Kconfig"
 
 endif
 
+choice
+    prompt "Optimize"
+
+config CC_OPTIMIZE_NORMAL
+    bool "Optimize Normal (-O2)"
+    help
+      Enabling this option will pass "-O2" to gcc
 config CC_OPTIMIZE_FOR_SIZE
-	bool "Optimize for size"
+	bool "Optimize for size (-Os)"
 	help
-	  Enabling this option will pass "-Os" instead of "-O2" to gcc
+	  Enabling this option will pass "-Os" to gcc
 	  resulting in a smaller kernel.
 
-	  If unsure, say N.
+config CC_OPTIMIZE_FOR_SPEED
+    bool "Optimze for speed (-O3)"
+    help
+      Enabling this option will pass "-O3" to gcc
+      resulting in a larger kernel (but possibly faster)
+
+endchoice
 
 config SYSCTL
 	bool
-- 
1.8.5.4


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

end of thread, other threads:[~2014-03-07 13:49 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-05  0:01 [PATCH] Add option to build with -O3 Jon Ringle
2014-03-05  5:09 ` Greg KH
2014-03-05  5:37   ` Jon Ringle
2014-03-05  6:08     ` Greg KH
2014-03-05  6:19       ` Jon Ringle
2014-03-05  6:31         ` Greg KH
2014-03-05 18:14         ` Valdis.Kletnieks
2014-03-06 13:28     ` Richard Weinberger
2014-03-07 12:39       ` Austin S Hemmelgarn
2014-03-07 12:42         ` Richard Weinberger
2014-03-07 12:51           ` Austin S Hemmelgarn
2014-03-07 13:48             ` Borislav Petkov
2014-03-05  7:32   ` Jon Ringle
2014-03-06  4:43     ` Greg KH
2014-03-05  7:36 jon
2014-03-06 12:28 ` Austin S Hemmelgarn

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.