diff options
Diffstat (limited to 'meta-microblaze/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch')
-rw-r--r-- | meta-microblaze/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 403 |
1 files changed, 403 insertions, 0 deletions
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch new file mode 100644 index 00000000..b59eed57 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | |||
@@ -0,0 +1,403 @@ | |||
1 | From 4de00af67b57b5440bdf61ab364ad959ad0aeee7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:24:50 +0400 | ||
4 | Subject: [PATCH] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER | ||
5 | relative to SYSTEMLIBS_DIR | ||
6 | |||
7 | This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER | ||
8 | relative to SYSTEMLIBS_DIR which can be set in generated headers | ||
9 | This breaks the assumption of hardcoded multilib in gcc | ||
10 | Change is only for the supported architectures in OE including | ||
11 | SH, sparc, alpha for possible future support (if any) | ||
12 | |||
13 | Removes the do_headerfix task in metadata | ||
14 | |||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | |||
17 | Upstream-Status: Inappropriate [OE configuration] | ||
18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
19 | --- | ||
20 | gcc/config/aarch64/aarch64-linux.h | 4 ++-- | ||
21 | gcc/config/alpha/linux-elf.h | 4 ++-- | ||
22 | gcc/config/arm/linux-eabi.h | 6 +++--- | ||
23 | gcc/config/arm/linux-elf.h | 2 +- | ||
24 | gcc/config/i386/linux.h | 4 ++-- | ||
25 | gcc/config/i386/linux64.h | 12 ++++++------ | ||
26 | gcc/config/linux.h | 8 ++++---- | ||
27 | gcc/config/loongarch/gnu-user.h | 4 ++-- | ||
28 | gcc/config/microblaze/linux.h | 4 ++-- | ||
29 | gcc/config/mips/linux.h | 18 +++++++++--------- | ||
30 | gcc/config/nios2/linux.h | 4 ++-- | ||
31 | gcc/config/riscv/linux.h | 4 ++-- | ||
32 | gcc/config/rs6000/linux64.h | 15 +++++---------- | ||
33 | gcc/config/rs6000/sysv4.h | 4 ++-- | ||
34 | gcc/config/s390/linux.h | 8 ++++---- | ||
35 | gcc/config/sh/linux.h | 4 ++-- | ||
36 | gcc/config/sparc/linux.h | 2 +- | ||
37 | gcc/config/sparc/linux64.h | 4 ++-- | ||
38 | 18 files changed, 53 insertions(+), 58 deletions(-) | ||
39 | |||
40 | diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h | ||
41 | index 5e4553d79f5..877e8841eb2 100644 | ||
42 | --- a/gcc/config/aarch64/aarch64-linux.h | ||
43 | +++ b/gcc/config/aarch64/aarch64-linux.h | ||
44 | @@ -21,10 +21,10 @@ | ||
45 | #ifndef GCC_AARCH64_LINUX_H | ||
46 | #define GCC_AARCH64_LINUX_H | ||
47 | |||
48 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" | ||
49 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" | ||
50 | |||
51 | #undef MUSL_DYNAMIC_LINKER | ||
52 | -#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" | ||
53 | +#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" | ||
54 | |||
55 | #undef ASAN_CC1_SPEC | ||
56 | #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" | ||
57 | diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h | ||
58 | index 17f16a55910..0a7be38fa63 100644 | ||
59 | --- a/gcc/config/alpha/linux-elf.h | ||
60 | +++ b/gcc/config/alpha/linux-elf.h | ||
61 | @@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see | ||
62 | #define EXTRA_SPECS \ | ||
63 | { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, | ||
64 | |||
65 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
66 | -#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
67 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
68 | +#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
69 | #if DEFAULT_LIBC == LIBC_UCLIBC | ||
70 | #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" | ||
71 | #elif DEFAULT_LIBC == LIBC_GLIBC | ||
72 | diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h | ||
73 | index 50cc0bc6d08..17c18b27145 100644 | ||
74 | --- a/gcc/config/arm/linux-eabi.h | ||
75 | +++ b/gcc/config/arm/linux-eabi.h | ||
76 | @@ -65,8 +65,8 @@ | ||
77 | GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ | ||
78 | |||
79 | #undef GLIBC_DYNAMIC_LINKER | ||
80 | -#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" | ||
81 | -#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" | ||
82 | +#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3" | ||
83 | +#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3" | ||
84 | #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT | ||
85 | |||
86 | #define GLIBC_DYNAMIC_LINKER \ | ||
87 | @@ -89,7 +89,7 @@ | ||
88 | #define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" | ||
89 | #endif | ||
90 | #define MUSL_DYNAMIC_LINKER \ | ||
91 | - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" | ||
92 | + SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" | ||
93 | |||
94 | /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to | ||
95 | use the GNU/Linux version, not the generic BPABI version. */ | ||
96 | diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h | ||
97 | index df3da67c4f0..37456e9d5a4 100644 | ||
98 | --- a/gcc/config/arm/linux-elf.h | ||
99 | +++ b/gcc/config/arm/linux-elf.h | ||
100 | @@ -60,7 +60,7 @@ | ||
101 | |||
102 | #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" | ||
103 | |||
104 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
105 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
106 | |||
107 | #define LINUX_TARGET_LINK_SPEC "%{h*} \ | ||
108 | %{static:-Bstatic} \ | ||
109 | diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h | ||
110 | index 5d99ee56d5b..a76022c9ccc 100644 | ||
111 | --- a/gcc/config/i386/linux.h | ||
112 | +++ b/gcc/config/i386/linux.h | ||
113 | @@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see | ||
114 | <http://www.gnu.org/licenses/>. */ | ||
115 | |||
116 | #define GNU_USER_LINK_EMULATION "elf_i386" | ||
117 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
118 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
119 | |||
120 | #undef MUSL_DYNAMIC_LINKER | ||
121 | -#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" | ||
122 | +#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-i386.so.1" | ||
123 | diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h | ||
124 | index 8681e36f10d..ddce49b6b60 100644 | ||
125 | --- a/gcc/config/i386/linux64.h | ||
126 | +++ b/gcc/config/i386/linux64.h | ||
127 | @@ -27,13 +27,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | ||
128 | #define GNU_USER_LINK_EMULATION64 "elf_x86_64" | ||
129 | #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" | ||
130 | |||
131 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" | ||
132 | -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" | ||
133 | -#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" | ||
134 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
135 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2" | ||
136 | +#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2" | ||
137 | |||
138 | #undef MUSL_DYNAMIC_LINKER32 | ||
139 | -#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" | ||
140 | +#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-i386.so.1" | ||
141 | #undef MUSL_DYNAMIC_LINKER64 | ||
142 | -#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" | ||
143 | +#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-x86_64.so.1" | ||
144 | #undef MUSL_DYNAMIC_LINKERX32 | ||
145 | -#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" | ||
146 | +#define MUSL_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-musl-x32.so.1" | ||
147 | diff --git a/gcc/config/linux.h b/gcc/config/linux.h | ||
148 | index 74f70793d90..4ce173384ef 100644 | ||
149 | --- a/gcc/config/linux.h | ||
150 | +++ b/gcc/config/linux.h | ||
151 | @@ -99,10 +99,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | ||
152 | GLIBC_DYNAMIC_LINKER must be defined for each target using them, or | ||
153 | GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets | ||
154 | supporting both 32-bit and 64-bit compilation. */ | ||
155 | -#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
156 | -#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" | ||
157 | -#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" | ||
158 | -#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0" | ||
159 | +#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
160 | +#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
161 | +#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" | ||
162 | +#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0" | ||
163 | #define BIONIC_DYNAMIC_LINKER "/system/bin/linker" | ||
164 | #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" | ||
165 | #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" | ||
166 | diff --git a/gcc/config/loongarch/gnu-user.h b/gcc/config/loongarch/gnu-user.h | ||
167 | index 664dc9206ad..082bd7cfc6f 100644 | ||
168 | --- a/gcc/config/loongarch/gnu-user.h | ||
169 | +++ b/gcc/config/loongarch/gnu-user.h | ||
170 | @@ -31,11 +31,11 @@ along with GCC; see the file COPYING3. If not see | ||
171 | |||
172 | #undef GLIBC_DYNAMIC_LINKER | ||
173 | #define GLIBC_DYNAMIC_LINKER \ | ||
174 | - "/lib" ABI_GRLEN_SPEC "/ld-linux-loongarch-" ABI_SPEC ".so.1" | ||
175 | + SYSTEMLIBS_DIR "ld-linux-loongarch-" ABI_SPEC ".so.1" | ||
176 | |||
177 | #undef MUSL_DYNAMIC_LINKER | ||
178 | #define MUSL_DYNAMIC_LINKER \ | ||
179 | - "/lib" ABI_GRLEN_SPEC "/ld-musl-loongarch-" ABI_SPEC ".so.1" | ||
180 | + SYSTEMLIBS_DIR "ld-musl-loongarch-" ABI_SPEC ".so.1" | ||
181 | |||
182 | #undef GNU_USER_TARGET_LINK_SPEC | ||
183 | #define GNU_USER_TARGET_LINK_SPEC \ | ||
184 | diff --git a/gcc/config/microblaze/linux.h b/gcc/config/microblaze/linux.h | ||
185 | index 5b1a365eda4..2e63df1ae9c 100644 | ||
186 | --- a/gcc/config/microblaze/linux.h | ||
187 | +++ b/gcc/config/microblaze/linux.h | ||
188 | @@ -28,7 +28,7 @@ | ||
189 | #undef TLS_NEEDS_GOT | ||
190 | #define TLS_NEEDS_GOT 1 | ||
191 | |||
192 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" | ||
193 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "/ld.so.1" | ||
194 | #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
195 | |||
196 | #if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */ | ||
197 | @@ -38,7 +38,7 @@ | ||
198 | #endif | ||
199 | |||
200 | #undef MUSL_DYNAMIC_LINKER | ||
201 | -#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1" | ||
202 | +#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1" | ||
203 | |||
204 | #undef SUBTARGET_EXTRA_SPECS | ||
205 | #define SUBTARGET_EXTRA_SPECS \ | ||
206 | diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h | ||
207 | index 230b7789bb8..d96d134bfcf 100644 | ||
208 | --- a/gcc/config/mips/linux.h | ||
209 | +++ b/gcc/config/mips/linux.h | ||
210 | @@ -22,29 +22,29 @@ along with GCC; see the file COPYING3. If not see | ||
211 | #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" | ||
212 | |||
213 | #define GLIBC_DYNAMIC_LINKER32 \ | ||
214 | - "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}" | ||
215 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" | ||
216 | #define GLIBC_DYNAMIC_LINKER64 \ | ||
217 | - "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}" | ||
218 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" | ||
219 | #define GLIBC_DYNAMIC_LINKERN32 \ | ||
220 | - "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}" | ||
221 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" | ||
222 | |||
223 | #undef UCLIBC_DYNAMIC_LINKER32 | ||
224 | #define UCLIBC_DYNAMIC_LINKER32 \ | ||
225 | - "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}" | ||
226 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" | ||
227 | #undef UCLIBC_DYNAMIC_LINKER64 | ||
228 | #define UCLIBC_DYNAMIC_LINKER64 \ | ||
229 | - "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}" | ||
230 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}" | ||
231 | #define UCLIBC_DYNAMIC_LINKERN32 \ | ||
232 | - "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}" | ||
233 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" | ||
234 | |||
235 | #undef MUSL_DYNAMIC_LINKER32 | ||
236 | #define MUSL_DYNAMIC_LINKER32 \ | ||
237 | - "/lib/ld-musl-mips%{mips32r6|mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1" | ||
238 | + SYSTEMLIBS_DIR "ld-musl-mips%{mips32r6|mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1" | ||
239 | #undef MUSL_DYNAMIC_LINKER64 | ||
240 | #define MUSL_DYNAMIC_LINKER64 \ | ||
241 | - "/lib/ld-musl-mips64%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1" | ||
242 | + SYSTEMLIBS_DIR "ld-musl-mips64%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1" | ||
243 | #define MUSL_DYNAMIC_LINKERN32 \ | ||
244 | - "/lib/ld-musl-mipsn32%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1" | ||
245 | + SYSTEMLIBS_DIR "ld-musl-mipsn32%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1" | ||
246 | |||
247 | #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" | ||
248 | #define GNU_USER_DYNAMIC_LINKERN32 \ | ||
249 | diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h | ||
250 | index f5dd813acad..7a13e1c9799 100644 | ||
251 | --- a/gcc/config/nios2/linux.h | ||
252 | +++ b/gcc/config/nios2/linux.h | ||
253 | @@ -29,8 +29,8 @@ | ||
254 | #undef CPP_SPEC | ||
255 | #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" | ||
256 | |||
257 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1" | ||
258 | -#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-nios2.so.1" | ||
259 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-nios2.so.1" | ||
260 | +#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-nios2.so.1" | ||
261 | |||
262 | #undef LINK_SPEC | ||
263 | #define LINK_SPEC LINK_SPEC_ENDIAN \ | ||
264 | diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h | ||
265 | index 38803723ba9..d5ef8a96a19 100644 | ||
266 | --- a/gcc/config/riscv/linux.h | ||
267 | +++ b/gcc/config/riscv/linux.h | ||
268 | @@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. If not see | ||
269 | GNU_USER_TARGET_OS_CPP_BUILTINS(); \ | ||
270 | } while (0) | ||
271 | |||
272 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1" | ||
273 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1" | ||
274 | |||
275 | #define MUSL_ABI_SUFFIX \ | ||
276 | "%{mabi=ilp32:-sf}" \ | ||
277 | @@ -33,7 +33,7 @@ along with GCC; see the file COPYING3. If not see | ||
278 | "%{mabi=lp64d:}" | ||
279 | |||
280 | #undef MUSL_DYNAMIC_LINKER | ||
281 | -#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1" | ||
282 | +#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1" | ||
283 | |||
284 | /* Because RISC-V only has word-sized atomics, it requries libatomic where | ||
285 | others do not. So link libatomic by default, as needed. */ | ||
286 | diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h | ||
287 | index b2a7afabc73..364c1a5b155 100644 | ||
288 | --- a/gcc/config/rs6000/linux64.h | ||
289 | +++ b/gcc/config/rs6000/linux64.h | ||
290 | @@ -339,24 +339,19 @@ extern int dot_symbols; | ||
291 | #undef LINK_OS_DEFAULT_SPEC | ||
292 | #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" | ||
293 | |||
294 | -#define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1" | ||
295 | - | ||
296 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1" | ||
297 | #ifdef LINUX64_DEFAULT_ABI_ELFv2 | ||
298 | -#define GLIBC_DYNAMIC_LINKER64 \ | ||
299 | -"%{mabi=elfv1:%(dynamic_linker_prefix)/lib64/ld64.so.1;" \ | ||
300 | -":%(dynamic_linker_prefix)/lib64/ld64.so.2}" | ||
301 | +#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}" | ||
302 | #else | ||
303 | -#define GLIBC_DYNAMIC_LINKER64 \ | ||
304 | -"%{mabi=elfv2:%(dynamic_linker_prefix)/lib64/ld64.so.2;" \ | ||
305 | -":%(dynamic_linker_prefix)/lib64/ld64.so.1}" | ||
306 | +#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}" | ||
307 | #endif | ||
308 | |||
309 | #undef MUSL_DYNAMIC_LINKER32 | ||
310 | #define MUSL_DYNAMIC_LINKER32 \ | ||
311 | - "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" | ||
312 | + SYSTEMLIBS_DIR "ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" | ||
313 | #undef MUSL_DYNAMIC_LINKER64 | ||
314 | #define MUSL_DYNAMIC_LINKER64 \ | ||
315 | - "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" | ||
316 | + SYSTEMLIBS_DIR "ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" | ||
317 | |||
318 | #undef DEFAULT_ASM_ENDIAN | ||
319 | #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) | ||
320 | diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h | ||
321 | index 7e2519de5d4..a73954d9de5 100644 | ||
322 | --- a/gcc/config/rs6000/sysv4.h | ||
323 | +++ b/gcc/config/rs6000/sysv4.h | ||
324 | @@ -779,10 +779,10 @@ GNU_USER_TARGET_CC1_SPEC | ||
325 | |||
326 | #define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","") | ||
327 | |||
328 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" | ||
329 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld.so.1" | ||
330 | #undef MUSL_DYNAMIC_LINKER | ||
331 | #define MUSL_DYNAMIC_LINKER \ | ||
332 | - "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" | ||
333 | + SYSTEMLIBS_DIR "ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" | ||
334 | |||
335 | #ifndef GNU_USER_DYNAMIC_LINKER | ||
336 | #define GNU_USER_DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER | ||
337 | diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h | ||
338 | index d7b7e7a7b02..0139b4d06ca 100644 | ||
339 | --- a/gcc/config/s390/linux.h | ||
340 | +++ b/gcc/config/s390/linux.h | ||
341 | @@ -72,13 +72,13 @@ along with GCC; see the file COPYING3. If not see | ||
342 | #define MULTILIB_DEFAULTS { "m31" } | ||
343 | #endif | ||
344 | |||
345 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" | ||
346 | -#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1" | ||
347 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1" | ||
348 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64.so.1" | ||
349 | |||
350 | #undef MUSL_DYNAMIC_LINKER32 | ||
351 | -#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-s390.so.1" | ||
352 | +#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-s390.so.1" | ||
353 | #undef MUSL_DYNAMIC_LINKER64 | ||
354 | -#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-s390x.so.1" | ||
355 | +#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-s390x.so.1" | ||
356 | |||
357 | #undef LINK_SPEC | ||
358 | #define LINK_SPEC \ | ||
359 | diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h | ||
360 | index d96d077c99e..7d27f9893ee 100644 | ||
361 | --- a/gcc/config/sh/linux.h | ||
362 | +++ b/gcc/config/sh/linux.h | ||
363 | @@ -61,10 +61,10 @@ along with GCC; see the file COPYING3. If not see | ||
364 | |||
365 | #undef MUSL_DYNAMIC_LINKER | ||
366 | #define MUSL_DYNAMIC_LINKER \ | ||
367 | - "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \ | ||
368 | + SYSTEMLIBS_DIR "ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \ | ||
369 | "%{mfdpic:-fdpic}.so.1" | ||
370 | |||
371 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
372 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
373 | |||
374 | #undef SUBTARGET_LINK_EMUL_SUFFIX | ||
375 | #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}" | ||
376 | diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h | ||
377 | index 6a809e9092d..60603765ad6 100644 | ||
378 | --- a/gcc/config/sparc/linux.h | ||
379 | +++ b/gcc/config/sparc/linux.h | ||
380 | @@ -78,7 +78,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); | ||
381 | When the -shared link option is used a final link is not being | ||
382 | done. */ | ||
383 | |||
384 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
385 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
386 | |||
387 | #undef LINK_SPEC | ||
388 | #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ | ||
389 | diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h | ||
390 | index d08a2ef96fe..e6955da0a5b 100644 | ||
391 | --- a/gcc/config/sparc/linux64.h | ||
392 | +++ b/gcc/config/sparc/linux64.h | ||
393 | @@ -78,8 +78,8 @@ along with GCC; see the file COPYING3. If not see | ||
394 | When the -shared link option is used a final link is not being | ||
395 | done. */ | ||
396 | |||
397 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" | ||
398 | -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" | ||
399 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
400 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
401 | |||
402 | #ifdef SPARC_BI_ARCH | ||
403 | |||