arch/loongarch: Fix toolchain triple ABI suffix

LoongArch GCC infers ABI from triple suffix, thus it's necesessary
to set up proper triple ABI suffixes for different ABI types.
See [1].

Adjust ABI suffix as per Table 10. List of possible <fabi-suffix>
in "LoongArch Toolchain Conventions Version 1.00" [2].

[1] https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config.gcc;h=a6f6efec4e103301225ef74c2d1159933d1c9cf8;hb=1757c320badc92c0628eafcd07d54585659692ed#l5102
[2] https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-EN.html#_gnu_target_triplets_and_multiarch_specifiers

Link: https://lore.kernel.org/all/20250706105859.292908-1-ju.o@free.fr/
Suggested-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
[Julien:
 - add link to gcc sources infering ABI
 - update loongarch doc link to point to triplet section
]
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Jiaxun Yang
2025-07-10 11:41:56 +01:00
committed by Julien Olivain
parent e7a175355b
commit 8b999bdf18

View File

@@ -83,6 +83,14 @@ ABI := $(ABI)hf
endif
endif
# LoongArch Float ABI suffixes
ifeq ($(BR2_LOONGARCH_ABI_LP64F),y)
ABI = f32
endif
ifeq ($(BR2_LOONGARCH_ABI_LP64S),y)
ABI = sf
endif
# For FSL PowerPC there's SPE
ifeq ($(BR2_POWERPC_CPU_HAS_SPE),y)
ABI = spe