From 4a8ed8e24886adf47086125f81307eaa8c358437 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 22 Aug 2014 19:42:29 +0900 Subject: kconfig: add CONFIG_CC_OPTIMIZE_FOR_SIZE Copy the Kconfig option from "init/Kconfig" of Linux v3.16 tag and adjust the help document. Signed-off-by: Masahiro Yamada --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 0fea5c2681..9646859083 100644 --- a/Makefile +++ b/Makefile @@ -529,7 +529,11 @@ else include/config/auto.conf: ; endif # $(dot-config) -KBUILD_CFLAGS += -Os #-fomit-frame-pointer +ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE +KBUILD_CFLAGS += -Os +else +KBUILD_CFLAGS += -O2 +endif ifdef BUILD_TAG KBUILD_CFLAGS += -DBUILD_TAG='"$(BUILD_TAG)"' -- cgit v1.2.1