401-LoongArch-Modify-MUSL_DYNAMIC_LINKER.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From 8bccee51f0deac64b79cd9ad75df599422f4c8ff Mon Sep 17 00:00:00 2001
  2. From: Lulu Cheng <[email protected]>
  3. Date: Sat, 18 Nov 2023 11:04:42 +0800
  4. Subject: [PATCH] LoongArch: Modify MUSL_DYNAMIC_LINKER.
  5. Use no suffix at all in the musl dynamic linker name for hard
  6. float ABI. Use -sf and -sp suffixes in musl dynamic linker name
  7. for soft float and single precision ABIs. The following table
  8. outlines the musl interpreter names for the LoongArch64 ABI names.
  9. musl interpreter | LoongArch64 ABI
  10. --------------------------- | -----------------
  11. ld-musl-loongarch64.so.1 | loongarch64-lp64d
  12. ld-musl-loongarch64-sp.so.1 | loongarch64-lp64f
  13. ld-musl-loongarch64-sf.so.1 | loongarch64-lp64s
  14. gcc/ChangeLog:
  15. * config/loongarch/gnu-user.h (MUSL_ABI_SPEC): Modify suffix.
  16. ---
  17. gcc/config/loongarch/gnu-user.h | 6 +++---
  18. 1 file changed, 3 insertions(+), 3 deletions(-)
  19. diff --git a/gcc/config/loongarch/gnu-user.h b/gcc/config/loongarch/gnu-user.h
  20. index 9616d6e8a0b..e9f4bcef1d4 100644
  21. --- a/gcc/config/loongarch/gnu-user.h
  22. +++ b/gcc/config/loongarch/gnu-user.h
  23. @@ -34,9 +34,9 @@ along with GCC; see the file COPYING3. If not see
  24. "/lib" ABI_GRLEN_SPEC "/ld-linux-loongarch-" ABI_SPEC ".so.1"
  25. #define MUSL_ABI_SPEC \
  26. - "%{mabi=lp64d:-lp64d}" \
  27. - "%{mabi=lp64f:-lp64f}" \
  28. - "%{mabi=lp64s:-lp64s}"
  29. + "%{mabi=lp64d:}" \
  30. + "%{mabi=lp64f:-sp}" \
  31. + "%{mabi=lp64s:-sf}"
  32. #undef MUSL_DYNAMIC_LINKER
  33. #define MUSL_DYNAMIC_LINKER \
  34. --
  35. 2.39.3