[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230401170117.1580840-1-masahiroy@kernel.org>
Date: Sun, 2 Apr 2023 02:01:17 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: linux-kbuild@...r.kernel.org,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Tom Rix <trix@...hat.com>, llvm@...ts.linux.dev
Cc: linux-kernel@...r.kernel.org, Fangrui Song <maskray@...gle.com>,
Masahiro Yamada <masahiroy@...nel.org>,
Nicolas Schier <nicolas@...sle.eu>
Subject: [PATCH] kbuild: clang: do not use CROSS_COMPILE for target triple
The target triple is overridden by the user-supplied CROSS_COMPILE,
but I do not see a good reason to support it. Users can use a new
architecture without adding CLANG_TARGET_FLAGS_*, but that would be
a rare case.
Use the hard-coded and deterministic target triple all the time.
Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
---
scripts/Makefile.clang | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/scripts/Makefile.clang b/scripts/Makefile.clang
index 70b354fa1cb4..9076cc939e87 100644
--- a/scripts/Makefile.clang
+++ b/scripts/Makefile.clang
@@ -13,15 +13,11 @@ CLANG_TARGET_FLAGS_x86 := x86_64-linux-gnu
CLANG_TARGET_FLAGS_um := $(CLANG_TARGET_FLAGS_$(SUBARCH))
CLANG_TARGET_FLAGS := $(CLANG_TARGET_FLAGS_$(SRCARCH))
-ifeq ($(CROSS_COMPILE),)
ifeq ($(CLANG_TARGET_FLAGS),)
-$(error Specify CROSS_COMPILE or add '--target=' option to scripts/Makefile.clang)
+$(error add '--target=' option to scripts/Makefile.clang)
else
CLANG_FLAGS += --target=$(CLANG_TARGET_FLAGS)
-endif # CLANG_TARGET_FLAGS
-else
-CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%))
-endif # CROSS_COMPILE
+endif
ifeq ($(LLVM_IAS),0)
CLANG_FLAGS += -fno-integrated-as
--
2.37.2
Powered by blists - more mailing lists