summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-08-22 19:42:29 +0900
committerTom Rini <trini@ti.com>2014-08-28 17:18:48 -0400
commit4a8ed8e24886adf47086125f81307eaa8c358437 (patch)
tree4f3ed3773631da2b41bae0d3f5a4693435abbf3b /Makefile
parenta6f47d2434f27e7c98dde811436912f0dd63a53e (diff)
downloadu-boot-imx-4a8ed8e24886adf47086125f81307eaa8c358437.zip
u-boot-imx-4a8ed8e24886adf47086125f81307eaa8c358437.tar.gz
u-boot-imx-4a8ed8e24886adf47086125f81307eaa8c358437.tar.bz2
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 <yamada.m@jp.panasonic.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 0fea5c2..9646859 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)"'