201-musl_arm.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
  2. Date: Wed, 27 May 2015 13:17:11 +0000 (+0000)
  3. Subject: [PATCH 4/13] arm musl support
  4. X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=de799bd087ab9a179768fea75bd195a31d3432a4
  5. [PATCH 4/13] arm musl support
  6. On behalf of szabolcs.nagy@arm.com
  7. 2015-05-27 Gregor Richards <gregor.richards@uwaterloo.ca>
  8. * config/arm/linux-eabi.h (MUSL_DYNAMIC_LINKER): Define.
  9. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223749 138bc75d-0d04-0410-961f-82ee72b054a4
  10. ---
  11. --- a/gcc/config/arm/linux-eabi.h
  12. +++ b/gcc/config/arm/linux-eabi.h
  13. @@ -77,6 +77,23 @@
  14. %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
  15. %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
  16. +/* For ARM musl currently supports four dynamic linkers:
  17. + - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
  18. + - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI
  19. + - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB
  20. + - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB
  21. + musl does not support the legacy OABI mode.
  22. + All the dynamic linkers live in /lib.
  23. + We default to soft-float, EL. */
  24. +#undef MUSL_DYNAMIC_LINKER
  25. +#if TARGET_BIG_ENDIAN_DEFAULT
  26. +#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}"
  27. +#else
  28. +#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
  29. +#endif
  30. +#define MUSL_DYNAMIC_LINKER \
  31. + "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
  32. +
  33. /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
  34. use the GNU/Linux version, not the generic BPABI version. */
  35. #undef LINK_SPEC