Skip to content

Commit ddc72c9

Browse files
committed
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@kernel.org> Acked-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
1 parent fb318e5 commit ddc72c9

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

scripts/Makefile.clang

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,11 @@ CLANG_TARGET_FLAGS_x86 := x86_64-linux-gnu
1313
CLANG_TARGET_FLAGS_um := $(CLANG_TARGET_FLAGS_$(SUBARCH))
1414
CLANG_TARGET_FLAGS := $(CLANG_TARGET_FLAGS_$(SRCARCH))
1515

16-
ifeq ($(CROSS_COMPILE),)
1716
ifeq ($(CLANG_TARGET_FLAGS),)
18-
$(error Specify CROSS_COMPILE or add '--target=' option to scripts/Makefile.clang)
17+
$(error add '--target=' option to scripts/Makefile.clang)
1918
else
2019
CLANG_FLAGS += --target=$(CLANG_TARGET_FLAGS)
21-
endif # CLANG_TARGET_FLAGS
22-
else
23-
CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%))
24-
endif # CROSS_COMPILE
20+
endif
2521

2622
ifeq ($(LLVM_IAS),0)
2723
CLANG_FLAGS += -fno-integrated-as

0 commit comments

Comments
 (0)