Skip to content
Permalink
Browse files

ZEN: Add a CONFIG option that sets -O3

Adjusted for v4.9.
  • Loading branch information...
heftig committed Oct 3, 2016
1 parent 56611f6 commit ce3bdffce643101479fa622b976992a4484c03e6
Showing with 11 additions and 0 deletions.
  1. +4 −0 Makefile
  2. +7 −0 init/Kconfig
@@ -660,12 +660,16 @@ ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += $(call cc-option,-Oz,-Os)
KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,)
else
ifdef CONFIG_CC_OPTIMIZE_HARDER
KBUILD_CFLAGS += -O3 $(call cc-disable-warning,maybe-uninitialized,)
else
ifdef CONFIG_PROFILE_ALL_BRANCHES
KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,)
else
KBUILD_CFLAGS += -O2
endif
endif
endif

KBUILD_CFLAGS += $(call cc-ifversion, -lt, 0409, \
$(call cc-disable-warning,maybe-uninitialized,))
@@ -1111,6 +1111,13 @@ config CC_OPTIMIZE_FOR_PERFORMANCE
with the "-O2" compiler flag for best performance and most
helpful compile-time warnings.

config CC_OPTIMIZE_HARDER
bool "Optimize harder"
help
This option will pass "-O3" to your compiler resulting in a
larger and faster kernel. The more complex optimizations also
increase compilation time and may affect stability.

config CC_OPTIMIZE_FOR_SIZE
bool "Optimize for size"
help

0 comments on commit ce3bdff

Please sign in to comment.
You can’t perform that action at this time.