[PATCH] xtensa: Fix big endian build

Marek Vasut marek.vasut+renesas at mailbox.org
Sun Nov 16 01:19:01 CET 2025


Make sure the correct PLATFORM_...FLAGS are assigned in each
case, consistently. Assign PLATFORM_ELFFLAGS for both LE and
BE case. The previous PLATFORM_CPPFLAGS makes no sense for
these particular parameters, which are passed to objcopy.

Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
---
Cc: Max Filippov <jcmvbkbc at gmail.com>
Cc: Tom Rini <trini at konsulko.com>
Cc: u-boot at lists.denx.de
---
 arch/xtensa/config.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/xtensa/config.mk b/arch/xtensa/config.mk
index 200b66f8504..75888720d4a 100644
--- a/arch/xtensa/config.mk
+++ b/arch/xtensa/config.mk
@@ -9,7 +9,7 @@ PLATFORM_CPPFLAGS += -D__XTENSA__ -mlongcalls -mforce-no-pic \
 LDFLAGS_FINAL += --gc-sections
 
 ifeq ($(CONFIG_SYS_BIG_ENDIAN),y)
-PLATFORM_CPPFLAGS += -B xtensa -O elf32-xtensa-be
+PLATFORM_ELFFLAGS += -B xtensa -O elf32-xtensa-be
 else
 PLATFORM_ELFFLAGS += -B xtensa -O elf32-xtensa-le
 endif
-- 
2.51.0



More information about the U-Boot mailing list