summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDmitrii Sharshakov <[email protected]>2025-11-01 10:39:59 +0100
committerTom Rini <[email protected]>2025-11-06 11:21:24 -0600
commitf7d177395d73f7747373dfd0ef7329834788106e (patch)
treea86ed1db0b8b5be3a8d5808a7742344283201b21 /Makefile
parente8e3b38def93b5e5d53569961237ce215454e141 (diff)
build: fix building u-boot.lds with Clang as a cross-compiler
Make sure to pass Clang flags to the KBUILD_CPPFLAGS as well, as this variable is used for flags during compiling for target Skipping this leads to Clang being invoked with args for target, but without target indication, thus defaulting to host arch: LDS u-boot.lds clang: error: ... '-mabi=' for target 'x86_64-suse-linux' clang: error: ... '-mno-thumb' for target 'x86_64-suse-linux' clang: error: ... '-mno-unaligned-access' for target 'x86_64-suse-linux' clang: error: ... '-ffixed-r9' for target 'x86_64-suse-linux' clang: error: ... '-mno-movt' for target 'x86_64-suse-linux' make: *** [Makefile:2345: u-boot.lds] Fehler 1 Signed-off-by: Dmitrii Sharshakov <[email protected]>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 750f8a84b1f..c10bf71b9ac 100644
--- a/Makefile
+++ b/Makefile
@@ -608,6 +608,7 @@ CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN)
endif
CLANG_FLAGS += -no-integrated-as
KBUILD_CFLAGS += $(CLANG_FLAGS)
+KBUILD_CPPFLAGS += $(CLANG_FLAGS)
KBUILD_AFLAGS += $(CLANG_FLAGS)
export CLANG_FLAGS
endif