From: Nathan Chancellor <natechancellor@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sasha Levin <sashal@kernel.org>,
stable@vger.kernel.org
Cc: Nick Desaulniers <ndesaulniers@google.com>,
clang-built-linux@googlegroups.com,
Matthias Kaehlcke <mka@chromium.org>,
Peter Zijlstra <peterz@infradead.org>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Nathan Chancellor <natechancellor@gmail.com>
Subject: [PATCH 4.9] Revert "kbuild: use -Oz instead of -Os when using clang"
Date: Tue, 23 Apr 2019 12:04:25 -0700 [thread overview]
Message-ID: <20190423190426.18720-5-natechancellor@gmail.com> (raw)
In-Reply-To: <20190423190426.18720-1-natechancellor@gmail.com>
From: Matthias Kaehlcke <mka@chromium.org>
commit a75bb4eb9e565b9f5115e2e8c07377ce32cbe69a upstream.
The clang option -Oz enables *aggressive* optimization for size,
which doesn't necessarily result in smaller images, but can have
negative impact on performance. Switch back to the less aggressive
-Os.
This reverts commit 6748cb3c299de1ffbe56733647b01dbcc398c419.
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
Makefile | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 966069dab768..994e52be8685 100644
--- a/Makefile
+++ b/Makefile
@@ -655,8 +655,7 @@ KBUILD_CFLAGS += $(call cc-option,-fdata-sections,)
endif
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
-KBUILD_CFLAGS += $(call cc-option,-Oz,-Os)
-KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,)
+KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
else
ifdef CONFIG_PROFILE_ALL_BRANCHES
KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,)
--
2.21.0
next prev parent reply other threads:[~2019-04-23 19:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-23 19:04 Backport of commit a75bb4eb9e565b9f5115e2e8c07377ce32cbe69a Nathan Chancellor
2019-04-23 19:04 ` [PATCH 4.14] Revert "kbuild: use -Oz instead of -Os when using clang" Nathan Chancellor
2019-04-23 19:04 ` [PATCH 4.19] " Nathan Chancellor
2019-04-23 19:04 ` [PATCH 4.4] " Nathan Chancellor
2019-04-23 19:04 ` Nathan Chancellor [this message]
2019-04-23 19:04 ` [PATCH 5.0] " Nathan Chancellor
2019-04-23 19:35 ` Backport of commit a75bb4eb9e565b9f5115e2e8c07377ce32cbe69a Sasha Levin
2019-04-23 19:42 ` Nick Desaulniers
2019-04-23 19:45 ` Nathan Chancellor
2019-04-23 19:56 ` Matthias Kaehlcke
2019-04-23 20:03 ` Nathan Chancellor
2019-04-23 23:46 ` Sasha Levin
2019-04-24 5:58 ` Sedat Dilek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190423190426.18720-5-natechancellor@gmail.com \
--to=natechancellor@gmail.com \
--cc=clang-built-linux@googlegroups.com \
--cc=gregkh@linuxfoundation.org \
--cc=mka@chromium.org \
--cc=ndesaulniers@google.com \
--cc=peterz@infradead.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.