From 86b232ea4b14cdd60e477a9d9ad7bf603d49b2fb Mon Sep 17 00:00:00 2001 From: XOR Date: Mon, 21 Oct 2024 17:47:59 +0200 Subject: [PATCH] Makefile: Pay attention to binary prefixes in the toolchains when setting GCC_TOOLCHAIN_DIR --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6798586fbb1c..ceb25517849d 100644 --- a/Makefile +++ b/Makefile @@ -512,7 +512,7 @@ CLANG_FLAGS := --target=$(notdir $(CLANG_TRIPLE:%-=%)) ifeq ($(shell $(srctree)/scripts/clang-android.sh $(CC) $(CLANG_FLAGS)), y) $(error "Clang with Android --target detected. Did you specify CLANG_TRIPLE?") endif -GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit)) +GCC_TOOLCHAIN_DIR := $(subst elfedit,,$(shell which $(CROSS_COMPILE)elfedit)) CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR) GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..) endif