VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Nathan Chancellor <nathan@kernel.org> 2021-03-09 13:59:15 -0700 committer: Masahiro Yamada <masahiroy@kernel.org> 2021-04-25 05:13:45 +0900 commit: eec08090bcc113643522d4272dc0b945045aba74 parent: c91d4e47e10ee4d3163838b1b727fe1d0664115b
Commit Summary:
Makefile: Only specify '--prefix=' when building with clang + GNU as
Diffstat:
1 file changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 40bfd059b5ef..5cb44595418c 100644
--- a/Makefile
+++ b/Makefile
@@ -579,11 +579,11 @@ CC_VERSION_TEXT = $(shell $(CC) --version 2>/dev/null | head -n 1 | sed 's/\#//g
 ifneq ($(findstring clang,$(CC_VERSION_TEXT)),)
 ifneq ($(CROSS_COMPILE),)
 CLANG_FLAGS	+= --target=$(notdir $(CROSS_COMPILE:%-=%))
-GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit))
-CLANG_FLAGS	+= --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE))
 endif
 ifneq ($(LLVM_IAS),1)
 CLANG_FLAGS	+= -no-integrated-as
+GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit))
+CLANG_FLAGS	+= --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE))
 endif
 CLANG_FLAGS	+= -Werror=unknown-warning-option
 KBUILD_CFLAGS	+= $(CLANG_FLAGS)