Commit 6d1a98bd authored by Dennis Rassmann's avatar Dennis Rassmann Committed by Dennis Rassmann
Browse files

Makefile: adding config variable for Os/O2/O3 compilation

Conflicts:

	init/Kconfig
parent cf16dfcd
......@@ -566,9 +566,13 @@ all: vmlinux
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += -Os
else
endif
ifdef CONFIG_CC_OPTIMIZE_DEFAULT
KBUILD_CFLAGS += -O2
endif
ifdef CONFIG_CC_OPTIMIZE_ALOT
KBUILD_CFLAGS += -O3
endif
include $(srctree)/arch/$(SRCARCH)/Makefile
......
......@@ -947,13 +947,20 @@ source "usr/Kconfig"
endif
choice
prompt "Optimization level"
default CC_OPTIMIZE_DEFAULT
config CC_OPTIMIZE_FOR_SIZE
bool "Optimize for size"
help
Enabling this option will pass "-Os" instead of "-O2" to gcc
resulting in a smaller kernel.
bool "Use -Os"
If unsure, say Y.
config CC_OPTIMIZE_DEFAULT
bool "Use -O2"
config CC_OPTIMIZE_ALOT
bool "Use -O3"
endchoice
config SYSCTL
bool
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment