From: Nick Desaulniers <ndesaulniers@google.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org, clang-built-linux@googlegroups.com,
Nick Desaulniers <ndesaulniers@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"H . Peter Anvin" <hpa@zytor.com>,
x86@kernel.org
Subject: [PATCH 5/7] x86: remove cc-option-yn test for -mtune=
Date: Mon, 16 Aug 2021 17:21:07 -0700 [thread overview]
Message-ID: <20210817002109.2736222-6-ndesaulniers@google.com> (raw)
In-Reply-To: <20210817002109.2736222-1-ndesaulniers@google.com>
As noted in the comment, -mtune= has been supported since GCC 3.4. The
minimum required version of GCC to build the kernel (as specified in
Documentation/process/changes.rst) is GCC 4.9.
tune is not immediately expanded. Instead it defines a macro that will
test via cc-option later values for -mtune=. But we can skip the test
whether to use -mtune= vs. -mcpu=.
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: x86@kernel.org
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
arch/x86/Makefile_32.cpu | 6 ------
1 file changed, 6 deletions(-)
diff --git a/arch/x86/Makefile_32.cpu b/arch/x86/Makefile_32.cpu
index cd3056759880..e7355f8b51c2 100644
--- a/arch/x86/Makefile_32.cpu
+++ b/arch/x86/Makefile_32.cpu
@@ -2,13 +2,7 @@
# CPU tuning section - shared with UML.
# Must change only cflags-y (or [yn]), not CFLAGS! That makes a difference for UML.
-#-mtune exists since gcc 3.4
-HAS_MTUNE := $(call cc-option-yn, -mtune=i386)
-ifeq ($(HAS_MTUNE),y)
tune = $(call cc-option,-mtune=$(1),$(2))
-else
-tune = $(call cc-option,-mcpu=$(1),$(2))
-endif
cflags-$(CONFIG_M486SX) += -march=i486
cflags-$(CONFIG_M486) += -march=i486
--
2.33.0.rc1.237.g0d66db33f3-goog
next prev parent reply other threads:[~2021-08-17 0:21 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-17 0:21 [PATCH 0/7] kbuild: remove cc-option-yn Nick Desaulniers
2021-08-17 0:21 ` [PATCH 1/7] MIPS: replace cc-option-yn uses with cc-option Nick Desaulniers
2021-08-17 1:59 ` Nathan Chancellor
2021-08-17 0:21 ` [PATCH 2/7] s390: " Nick Desaulniers
2021-08-17 2:03 ` Nathan Chancellor
2021-08-23 17:43 ` Heiko Carstens
2021-08-25 4:37 ` Masahiro Yamada
2021-08-17 0:21 ` [PATCH 3/7] powerpc: " Nick Desaulniers
2021-08-17 1:41 ` Nathan Chancellor
2021-08-17 2:31 ` Michael Ellerman
2021-08-19 20:04 ` Masahiro Yamada
2021-08-17 0:21 ` [PATCH 4/7] arc: " Nick Desaulniers
2021-08-17 2:05 ` Nathan Chancellor
2021-08-17 18:07 ` Nick Desaulniers
2021-08-18 1:40 ` Nathan Chancellor
2021-08-25 4:38 ` Masahiro Yamada
2021-08-17 0:21 ` Nick Desaulniers [this message]
2021-08-17 2:08 ` [PATCH 5/7] x86: remove cc-option-yn test for -mtune= Nathan Chancellor
2021-08-19 19:54 ` Masahiro Yamada
2021-08-19 22:19 ` Miguel Ojeda
2021-08-25 4:39 ` Masahiro Yamada
2021-08-17 0:21 ` [PATCH 6/7] Makefile: replace cc-option-yn uses with cc-option Nick Desaulniers
2021-08-17 2:09 ` Nathan Chancellor
2021-08-25 4:43 ` Masahiro Yamada
2021-08-25 4:49 ` Masahiro Yamada
2021-08-17 0:21 ` [PATCH 7/7] kbuild: remove cc-option-yn, update Docs Nick Desaulniers
2021-08-17 2:10 ` Nathan Chancellor
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=20210817002109.2736222-6-ndesaulniers@google.com \
--to=ndesaulniers@google.com \
--cc=bp@alien8.de \
--cc=clang-built-linux@googlegroups.com \
--cc=hpa@zytor.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox