1 Add dynamic linker support for uClibc-ng/musl
3 Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
6 diff -Nur gcc-5.4.0.orig/gcc/config/microblaze/linux.h gcc-5.4.0/gcc/config/microblaze/linux.h
7 --- gcc-5.4.0.orig/gcc/config/microblaze/linux.h 2015-05-28 16:08:19.000000000 +0200
8 +++ gcc-5.4.0/gcc/config/microblaze/linux.h 2016-10-23 17:09:46.962010871 +0200
11 #define TLS_NEEDS_GOT 1
13 -#define DYNAMIC_LINKER "/lib/ld.so.1"
14 +#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
15 +#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
17 +#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */
18 +#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}"
20 +#define MUSL_DYNAMIC_LINKER_E "%{EL:el}"
23 +#undef MUSL_DYNAMIC_LINKER
24 +#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1"
26 +#if DEFAULT_LIBC == LIBC_UCLIBC
27 +#define DYNAMIC_LINKER UCLIBC_DYNAMIC_LINKER
28 +#elif DEFAULT_LIBC == LIBC_MUSL
29 +#define DYNAMIC_LINKER MUSL_DYNAMIC_LINKER
31 +#define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
34 #undef SUBTARGET_EXTRA_SPECS
35 #define SUBTARGET_EXTRA_SPECS \
36 { "dynamic_linker", DYNAMIC_LINKER }