1 From foo@baz Wed Nov 21 18:50:39 CET 2018
2 From: Behan Webster <behanw@converseincode.com>
3 Date: Mon, 27 Mar 2017 18:19:09 -0700
4 Subject: kbuild: use -Oz instead of -Os when using clang
6 From: Behan Webster <behanw@converseincode.com>
8 commit 6748cb3c299de1ffbe56733647b01dbcc398c419 upstream.
10 This generates smaller resulting object code when compiled with clang.
12 Signed-off-by: Behan Webster <behanw@converseincode.com>
13 Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
14 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
15 [nc: Adjust context due to lack of commit a76bcf557ef4 in linux-4.4.y]
16 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
17 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 1 file changed, 1 insertion(+), 1 deletion(-)
24 @@ -628,7 +628,7 @@ KBUILD_CFLAGS += $(call cc-disable-warni
25 KBUILD_CFLAGS += $(call cc-disable-warning, attribute-alias)
27 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
29 +KBUILD_CFLAGS += $(call cc-option,-Oz,-Os)
31 ifdef CONFIG_PROFILE_ALL_BRANCHES