forked from GregorR/musl-gcc-patches
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmicroblaze.diff
31 lines (29 loc) · 915 Bytes
/
microblaze.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# HG changeset patch
# Parent 25bb57ef02c8b09bbc585f0ea719b7f128a1ef18
Microblaze support (again).
diff -r 25bb57ef02c8 gcc/config/microblaze/linux.h
--- a/gcc/config/microblaze/linux.h Sun Jul 26 15:46:32 2015 -0400
+++ b/gcc/config/microblaze/linux.h Sun Jul 26 15:46:34 2015 -0400
@@ -28,7 +28,22 @@
#undef TLS_NEEDS_GOT
#define TLS_NEEDS_GOT 1
-#define DYNAMIC_LINKER "/lib/ld.so.1"
+#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */
+#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}"
+#else
+#define MUSL_DYNAMIC_LINKER_E "%{EL:el}"
+#endif
+
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1"
+#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
+
+#if DEFAULT_LIBC == LIBC_MUSL
+#define DYNAMIC_LINKER MUSL_DYNAMIC_LINKER
+#else
+#define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
+#endif
+
+
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
{ "dynamic_linker", DYNAMIC_LINKER }