1
0

204-musl_sh.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. gcc/Changelog:
  2. 2015-04-27 Gregor Richards <gregor.richards@uwaterloo.ca>
  3. Szabolcs Nagy <szabolcs.nagy@arm.com>
  4. * config/sh/linux.h (MUSL_DYNAMIC_LINKER): Define.
  5. (MUSL_DYNAMIC_LINKER_E, MUSL_DYNAMIC_LINKER_FP): Define.
  6. --- a/gcc/config/sh/linux.h
  7. +++ b/gcc/config/sh/linux.h
  8. @@ -43,6 +43,28 @@ along with GCC; see the file COPYING3.
  9. #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
  10. +#if TARGET_ENDIAN_DEFAULT == MASK_LITTLE_ENDIAN
  11. +#define MUSL_DYNAMIC_LINKER_E "%{mb:eb}"
  12. +#else
  13. +#define MUSL_DYNAMIC_LINKER_E "%{!ml:eb}"
  14. +#endif
  15. +
  16. +#if TARGET_CPU_DEFAULT & ( MASK_HARD_SH2A_DOUBLE | MASK_SH4 )
  17. +/* "-nofpu" if any nofpu option is specified */
  18. +#define MUSL_DYNAMIC_LINKER_FP \
  19. + "%{m1|m2|m2a-nofpu|m3|m4-nofpu|m4-100-nofpu|m4-200-nofpu|m4-300-nofpu|" \
  20. + "m4-340|m4-400|m4-500|m4al|m5-32media-nofpu|m5-64media-nofpu|" \
  21. + "m5-compact-nofpu:-nofpu}"
  22. +#else
  23. +/* "-nofpu" if none of the hard fpu options are specified */
  24. +#define MUSL_DYNAMIC_LINKER_FP \
  25. + "%{m2a|m4|m4-100|m4-200|m4-300|m4a|m5-32media|m5-64media|m5-compact:;:-nofpu}"
  26. +#endif
  27. +
  28. +#undef MUSL_DYNAMIC_LINKER
  29. +#define MUSL_DYNAMIC_LINKER \
  30. + "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP ".so.1"
  31. +
  32. #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
  33. #undef SUBTARGET_LINK_EMUL_SUFFIX