]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
xtensa: Define PLATFORM_ELFFLAGS
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Tue, 18 Jun 2024 13:56:04 +0000 (14:56 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 4 Jul 2024 22:08:37 +0000 (16:08 -0600)
u-boot.elf target requires it to work.

Tested-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
arch/xtensa/config.mk

index b0809999e403b72ec2128e4e402e038aba72258b..200b66f850473530d27ecb48b9a8b7f8dd71b2ff 100644 (file)
@@ -7,3 +7,9 @@ PLATFORM_CPPFLAGS += -D__XTENSA__ -mlongcalls -mforce-no-pic \
                     -ffunction-sections -fdata-sections
 
 LDFLAGS_FINAL += --gc-sections
+
+ifeq ($(CONFIG_SYS_BIG_ENDIAN),y)
+PLATFORM_CPPFLAGS += -B xtensa -O elf32-xtensa-be
+else
+PLATFORM_ELFFLAGS += -B xtensa -O elf32-xtensa-le
+endif