]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.114/revert-kbuild-use-oz-instead-of-os-when-using-clang.patch
Linux 4.14.114
[thirdparty/kernel/stable-queue.git] / releases / 4.14.114 / revert-kbuild-use-oz-instead-of-os-when-using-clang.patch
CommitLineData
82b2f3ba
SL
1From 1258e3c16dd2a41be56f2d63a9eb61ac6792c7cf Mon Sep 17 00:00:00 2001
2From: Matthias Kaehlcke <mka@chromium.org>
3Date: Tue, 23 Apr 2019 12:04:22 -0700
4Subject: Revert "kbuild: use -Oz instead of -Os when using clang"
5
6commit a75bb4eb9e565b9f5115e2e8c07377ce32cbe69a upstream.
7
8The clang option -Oz enables *aggressive* optimization for size,
9which doesn't necessarily result in smaller images, but can have
10negative impact on performance. Switch back to the less aggressive
11-Os.
12
13This reverts commit 6748cb3c299de1ffbe56733647b01dbcc398c419.
14
15Suggested-by: Peter Zijlstra <peterz@infradead.org>
16Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
17Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
18Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
19Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
20Signed-off-by: Sasha Levin <sashal@kernel.org>
21---
22 Makefile | 3 +--
23 1 file changed, 1 insertion(+), 2 deletions(-)
24
25diff --git a/Makefile b/Makefile
26index 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--
402.19.1
41