clang: Add $(CLANG_TARGET) to LDPPFLAGS
When we invoke $(CPP) to make u-boot.lds we have LDPPFLAGS available to set other required flags here. As this file is for the target and not the host, we must ensure that CPP knows what the target architecture is. For this, pass in $(CLANG_TARGET). Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
c2e5eea38a
commit
fd0712acce
1 changed files with 1 additions and 0 deletions
1
Makefile
1
Makefile
|
@ -437,6 +437,7 @@ KBUILD_LDFLAGS :=
|
|||
ifeq ($(cc-name),clang)
|
||||
ifneq ($(CROSS_COMPILE),)
|
||||
CLANG_TARGET := --target=$(notdir $(CROSS_COMPILE:%-=%))
|
||||
LDPPFLAGS += $(CLANG_TARGET)
|
||||
GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD)))
|
||||
CLANG_PREFIX := --prefix=$(GCC_TOOLCHAIN_DIR)
|
||||
GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
|
||||
|
|
Loading…
Reference in a new issue