microblaze-uclibc.patch 1.1 KB

1234567891011121314151617181920212223242526272829
  1. diff -Nur gcc-4.9.2.orig/gcc/config/microblaze/linux.h gcc-4.9.2/gcc/config/microblaze/linux.h
  2. --- gcc-4.9.2.orig/gcc/config/microblaze/linux.h 2014-01-02 16:23:26.000000000 -0600
  3. +++ gcc-4.9.2/gcc/config/microblaze/linux.h 2015-06-07 09:32:24.621501374 -0500
  4. @@ -25,10 +25,23 @@
  5. #undef TLS_NEEDS_GOT
  6. #define TLS_NEEDS_GOT 1
  7. -#define DYNAMIC_LINKER "/lib/ld.so.1"
  8. +#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
  9. +#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
  10. +#if DEFAULT_LIBC == LIBC_UCLIBC
  11. +#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
  12. +#elif DEFAULT_LIBC == LIBC_GLIBC
  13. +#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
  14. +#else
  15. +#error "Unsupported DEFAULT_LIBC"
  16. +#endif
  17. +#define GNU_USER_DYNAMIC_LINKER \
  18. + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
  19. +
  20. +#define ELF_DYNAMIC_LINKER GNU_USER_DYNAMIC_LINKER
  21. +
  22. #undef SUBTARGET_EXTRA_SPECS
  23. #define SUBTARGET_EXTRA_SPECS \
  24. - { "dynamic_linker", DYNAMIC_LINKER }
  25. + { "dynamic_linker", ELF_DYNAMIC_LINKER }
  26. #undef LINK_SPEC
  27. #define LINK_SPEC "%{shared:-shared} \