From 3991f85e4cdcd721c91d376468e5396504e2199d Mon Sep 17 00:00:00 2001 From: Ilias Apalodimas Date: Wed, 11 Jun 2025 23:24:31 +0300 Subject: [PATCH] kbuild: clang: choose GCC_TOOLCHAIN_DIR not on LD Backported from kernel commit ad15006cc784 ("kbuild: clang: choose GCC_TOOLCHAIN_DIR not on LD") Signed-off-by: Ilias Apalodimas --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7e1b36e78b9..e648f4920cf 100644 --- a/Makefile +++ b/Makefile @@ -446,7 +446,7 @@ ifeq ($(cc-name),clang) ifneq ($(CROSS_COMPILE),) CLANG_TARGET := --target=$(notdir $(CROSS_COMPILE:%-=%)) LDPPFLAGS += $(CLANG_TARGET) -GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD))) +GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit)) CLANG_PREFIX := --prefix=$(GCC_TOOLCHAIN_DIR) GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..) endif -- 2.47.2