]>
Commit | Line | Data |
---|---|---|
82b2f3ba SL |
1 | From 1258e3c16dd2a41be56f2d63a9eb61ac6792c7cf Mon Sep 17 00:00:00 2001 |
2 | From: Matthias Kaehlcke <mka@chromium.org> | |
3 | Date: Tue, 23 Apr 2019 12:04:22 -0700 | |
4 | Subject: Revert "kbuild: use -Oz instead of -Os when using clang" | |
5 | ||
6 | commit a75bb4eb9e565b9f5115e2e8c07377ce32cbe69a upstream. | |
7 | ||
8 | The clang option -Oz enables *aggressive* optimization for size, | |
9 | which doesn't necessarily result in smaller images, but can have | |
10 | negative impact on performance. Switch back to the less aggressive | |
11 | -Os. | |
12 | ||
13 | This reverts commit 6748cb3c299de1ffbe56733647b01dbcc398c419. | |
14 | ||
15 | Suggested-by: Peter Zijlstra <peterz@infradead.org> | |
16 | Signed-off-by: Matthias Kaehlcke <mka@chromium.org> | |
17 | Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> | |
18 | Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> | |
19 | Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> | |
20 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
21 | --- | |
22 | Makefile | 3 +-- | |
23 | 1 file changed, 1 insertion(+), 2 deletions(-) | |
24 | ||
25 | diff --git a/Makefile b/Makefile | |
26 | index fcfef30ca9a6..d36e66ff60aa 100644 | |
27 | --- a/Makefile | |
28 | +++ b/Makefile | |
29 | @@ -653,8 +653,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context) | |
30 | KBUILD_CFLAGS += $(call cc-disable-warning, attribute-alias) | |
31 | ||
32 | ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE | |
33 | -KBUILD_CFLAGS += $(call cc-option,-Oz,-Os) | |
34 | -KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,) | |
35 | +KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) | |
36 | else | |
37 | ifdef CONFIG_PROFILE_ALL_BRANCHES | |
38 | KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,) | |
39 | -- | |
40 | 2.19.1 | |
41 |