Commit c8250381 authored by Behan Webster's avatar Behan Webster Committed by Greg Kroah-Hartman

kbuild: use -Oz instead of -Os when using clang

commit 6748cb3c upstream.

This generates smaller resulting object code when compiled with clang.
Signed-off-by: default avatarBehan Webster <behanw@converseincode.com>
Signed-off-by: default avatarMatthias Kaehlcke <mka@chromium.org>
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
[nc: Adjust context due to lack of commit a76bcf55 in linux-4.4.y]
Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 04581253
......@@ -628,7 +628,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context)
KBUILD_CFLAGS += $(call cc-disable-warning, attribute-alias)
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += -Os
KBUILD_CFLAGS += $(call cc-option,-Oz,-Os)
else
ifdef CONFIG_PROFILE_ALL_BRANCHES
KBUILD_CFLAGS += -O2
......
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