From 8b999bdf1853d44dc57fd48198b82275c720ca38 Mon Sep 17 00:00:00 2001 From: Jiaxun Yang Date: Thu, 10 Jul 2025 11:41:56 +0100 Subject: [PATCH] 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 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 Signed-off-by: Jiaxun Yang [Julien: - add link to gcc sources infering ABI - update loongarch doc link to point to triplet section ] Signed-off-by: Julien Olivain --- package/Makefile.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/Makefile.in b/package/Makefile.in index 829636900b..5ebb5f9ba8 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -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