Message ID | 20230405234859.1446811-3-trini@konsulko.com |
---|---|
State | Accepted |
Commit | fd0712acce928c7966c172b8014ca8007deb457c |
Delegated to: | Tom Rini |
Headers | show |
Series | Update clang support for ARM | expand |
On Thu, 6 Apr 2023 at 11:49, Tom Rini <trini@konsulko.com> wrote: > > 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> > --- > Makefile | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Simon Glass <sjg@chromium.org>
On Wed, Apr 05, 2023 at 07:48:52PM -0400, Tom Rini wrote: > 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> Applied to u-boot/master, thanks!
diff --git a/Makefile b/Makefile index 5083beae359a..97a84ae3131e 100644 --- a/Makefile +++ b/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)/..)
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> --- Makefile | 1 + 1 file changed, 1 insertion(+)