summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Zhukov <pavel@zhukoff.net>2023-01-16 08:56:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-01-26 23:37:05 +0000
commit2453dfa90af40286618511eab41aa19aaf054804 (patch)
tree5aa0a176685c04360b844f3e7c767f2004ea17d3
parent370c87ac605e867450a12b00658ff707e4adbed2 (diff)
downloadpoky-2453dfa90af40286618511eab41aa19aaf054804.tar.gz
gcc: Refactor linker patches and fix linker on arm with usrmerge
Backport fix from master to allow gcc to use proper linker path for musl [Yocto #14977]. Fixes: | qemu-arm: Could not open '/lib/ld-musl-armhf.so.1': No such file or directory (From OE-Core rev: d821a602c56a8d0c8171ee0d2ce31613121be3a6) Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/gcc/gcc-11.3.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc/0004-arm-add-armv9-a-architecture-to-march.patch89
-rw-r--r--meta/recipes-devtools/gcc/gcc/0006-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch269
-rw-r--r--meta/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch10
-rw-r--r--meta/recipes-devtools/gcc/gcc/0019-nios2-Define-MUSL_DYNAMIC_LINKER.patch25
5 files changed, 245 insertions, 149 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-11.3.inc b/meta/recipes-devtools/gcc/gcc-11.3.inc
index 27074a06ae..ab2ece3cce 100644
--- a/meta/recipes-devtools/gcc/gcc-11.3.inc
+++ b/meta/recipes-devtools/gcc/gcc-11.3.inc
@@ -48,7 +48,6 @@ SRC_URI = "\
48 file://0016-If-CXXFLAGS-contains-something-unsupported-by-the-bu.patch \ 48 file://0016-If-CXXFLAGS-contains-something-unsupported-by-the-bu.patch \
49 file://0017-handle-sysroot-support-for-nativesdk-gcc.patch \ 49 file://0017-handle-sysroot-support-for-nativesdk-gcc.patch \
50 file://0018-Search-target-sysroot-gcc-version-specific-dirs-with.patch \ 50 file://0018-Search-target-sysroot-gcc-version-specific-dirs-with.patch \
51 file://0019-nios2-Define-MUSL_DYNAMIC_LINKER.patch \
52 file://0020-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \ 51 file://0020-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \
53 file://0021-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \ 52 file://0021-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \
54 file://0022-sync-gcc-stddef.h-with-musl.patch \ 53 file://0022-sync-gcc-stddef.h-with-musl.patch \
diff --git a/meta/recipes-devtools/gcc/gcc/0004-arm-add-armv9-a-architecture-to-march.patch b/meta/recipes-devtools/gcc/gcc/0004-arm-add-armv9-a-architecture-to-march.patch
index c38d1b9119..864c8b3017 100644
--- a/meta/recipes-devtools/gcc/gcc/0004-arm-add-armv9-a-architecture-to-march.patch
+++ b/meta/recipes-devtools/gcc/gcc/0004-arm-add-armv9-a-architecture-to-march.patch
@@ -43,10 +43,10 @@ Signed-off-by: Ruiqiang Hao <Ruiqiang.Hao@windriver.com>
43 gcc/testsuite/lib/target-supports.exp | 3 ++- 43 gcc/testsuite/lib/target-supports.exp | 3 ++-
44 9 files changed, 79 insertions(+), 8 deletions(-) 44 9 files changed, 79 insertions(+), 8 deletions(-)
45 45
46diff --git a/gcc/config/arm/arm-cpus.in b/gcc/config/arm/arm-cpus.in 46Index: gcc-11.3.0/gcc/config/arm/arm-cpus.in
47index bcc9ebe9f..58d83829c 100644 47===================================================================
48--- a/gcc/config/arm/arm-cpus.in 48--- gcc-11.3.0.orig/gcc/config/arm/arm-cpus.in
49+++ b/gcc/config/arm/arm-cpus.in 49+++ gcc-11.3.0/gcc/config/arm/arm-cpus.in
50@@ -132,6 +132,9 @@ define feature cmse 50@@ -132,6 +132,9 @@ define feature cmse
51 # Architecture rel 8.1-M. 51 # Architecture rel 8.1-M.
52 define feature armv8_1m_main 52 define feature armv8_1m_main
@@ -57,7 +57,7 @@ index bcc9ebe9f..58d83829c 100644
57 # Floating point and Neon extensions. 57 # Floating point and Neon extensions.
58 # VFPv1 is not supported in GCC. 58 # VFPv1 is not supported in GCC.
59 59
60@@ -293,6 +296,7 @@ define fgroup ARMv8m_base ARMv6m armv8 cmse tdiv 60@@ -293,6 +296,7 @@ define fgroup ARMv8m_base ARMv6m armv8 c
61 define fgroup ARMv8m_main ARMv7m armv8 cmse 61 define fgroup ARMv8m_main ARMv7m armv8 cmse
62 define fgroup ARMv8r ARMv8a 62 define fgroup ARMv8r ARMv8a
63 define fgroup ARMv8_1m_main ARMv8m_main armv8_1m_main 63 define fgroup ARMv8_1m_main ARMv8m_main armv8_1m_main
@@ -87,10 +87,10 @@ index bcc9ebe9f..58d83829c 100644
87 begin arch iwmmxt 87 begin arch iwmmxt
88 tune for iwmmxt 88 tune for iwmmxt
89 tune flags LDSCHED STRONG XSCALE 89 tune flags LDSCHED STRONG XSCALE
90diff --git a/gcc/config/arm/arm-tables.opt b/gcc/config/arm/arm-tables.opt 90Index: gcc-11.3.0/gcc/config/arm/arm-tables.opt
91index 5692d4fb7..ae3dd9414 100644 91===================================================================
92--- a/gcc/config/arm/arm-tables.opt 92--- gcc-11.3.0.orig/gcc/config/arm/arm-tables.opt
93+++ b/gcc/config/arm/arm-tables.opt 93+++ gcc-11.3.0/gcc/config/arm/arm-tables.opt
94@@ -380,10 +380,13 @@ EnumValue 94@@ -380,10 +380,13 @@ EnumValue
95 Enum(arm_arch) String(armv8.1-m.main) Value(30) 95 Enum(arm_arch) String(armv8.1-m.main) Value(30)
96 96
@@ -107,10 +107,10 @@ index 5692d4fb7..ae3dd9414 100644
107 107
108 Enum 108 Enum
109 Name(arm_fpu) Type(enum fpu_type) 109 Name(arm_fpu) Type(enum fpu_type)
110diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h 110Index: gcc-11.3.0/gcc/config/arm/arm.h
111index 47c13a9e5..088c7725c 100644 111===================================================================
112--- a/gcc/config/arm/arm.h 112--- gcc-11.3.0.orig/gcc/config/arm/arm.h
113+++ b/gcc/config/arm/arm.h 113+++ gcc-11.3.0/gcc/config/arm/arm.h
114@@ -456,7 +456,8 @@ enum base_architecture 114@@ -456,7 +456,8 @@ enum base_architecture
115 BASE_ARCH_8A = 8, 115 BASE_ARCH_8A = 8,
116 BASE_ARCH_8M_BASE = 8, 116 BASE_ARCH_8M_BASE = 8,
@@ -121,10 +121,10 @@ index 47c13a9e5..088c7725c 100644
121 }; 121 };
122 122
123 /* The major revision number of the ARM Architecture implemented by the target. */ 123 /* The major revision number of the ARM Architecture implemented by the target. */
124diff --git a/gcc/config/arm/t-aprofile b/gcc/config/arm/t-aprofile 124Index: gcc-11.3.0/gcc/config/arm/t-aprofile
125index 8574ac3e2..68e2251c7 100644 125===================================================================
126--- a/gcc/config/arm/t-aprofile 126--- gcc-11.3.0.orig/gcc/config/arm/t-aprofile
127+++ b/gcc/config/arm/t-aprofile 127+++ gcc-11.3.0/gcc/config/arm/t-aprofile
128@@ -26,8 +26,8 @@ 128@@ -26,8 +26,8 @@
129 129
130 # Arch and FPU variants to build libraries with 130 # Arch and FPU variants to build libraries with
@@ -136,7 +136,7 @@ index 8574ac3e2..68e2251c7 100644
136 136
137 # ARMv7-A - build nofp, fp-d16 and SIMD variants 137 # ARMv7-A - build nofp, fp-d16 and SIMD variants
138 138
139@@ -46,6 +46,11 @@ MULTILIB_REQUIRED += mthumb/march=armv8-a/mfloat-abi=soft 139@@ -46,6 +46,11 @@ MULTILIB_REQUIRED += mthumb/march=armv8-
140 MULTILIB_REQUIRED += mthumb/march=armv8-a+simd/mfloat-abi=hard 140 MULTILIB_REQUIRED += mthumb/march=armv8-a+simd/mfloat-abi=hard
141 MULTILIB_REQUIRED += mthumb/march=armv8-a+simd/mfloat-abi=softfp 141 MULTILIB_REQUIRED += mthumb/march=armv8-a+simd/mfloat-abi=softfp
142 142
@@ -148,7 +148,7 @@ index 8574ac3e2..68e2251c7 100644
148 # Matches 148 # Matches
149 149
150 # Arch Matches 150 # Arch Matches
151@@ -129,17 +134,29 @@ MULTILIB_MATCHES += march?armv8-a=march?armv8.6-a 151@@ -129,17 +134,29 @@ MULTILIB_MATCHES += march?armv8-a=march?
152 MULTILIB_MATCHES += $(foreach ARCH, $(v8_6_a_simd_variants), \ 152 MULTILIB_MATCHES += $(foreach ARCH, $(v8_6_a_simd_variants), \
153 march?armv8-a+simd=march?armv8.6-a$(ARCH)) 153 march?armv8-a+simd=march?armv8.6-a$(ARCH))
154 154
@@ -180,11 +180,11 @@ index 8574ac3e2..68e2251c7 100644
180- $(foreach ARCH, armv7-a armv8-a, \ 180- $(foreach ARCH, armv7-a armv8-a, \
181+ $(foreach ARCH, armv7-a armv8-a armv9-a, \ 181+ $(foreach ARCH, armv7-a armv8-a armv9-a, \
182 mthumb/march.$(ARCH)/mfloat-abi.soft=m$(MODE)/march.$(ARCH)/mfloat-abi.softfp)) 182 mthumb/march.$(ARCH)/mfloat-abi.soft=m$(MODE)/march.$(ARCH)/mfloat-abi.softfp))
183diff --git a/gcc/config/arm/t-arm-elf b/gcc/config/arm/t-arm-elf 183Index: gcc-11.3.0/gcc/config/arm/t-arm-elf
184index d68def308..b3a900e8c 100644 184===================================================================
185--- a/gcc/config/arm/t-arm-elf 185--- gcc-11.3.0.orig/gcc/config/arm/t-arm-elf
186+++ b/gcc/config/arm/t-arm-elf 186+++ gcc-11.3.0/gcc/config/arm/t-arm-elf
187@@ -38,6 +38,8 @@ v7ve_fps := vfpv3-d16 vfpv3 vfpv3-d16-fp16 vfpv3-fp16 vfpv4 neon \ 187@@ -38,6 +38,8 @@ v7ve_fps := vfpv3-d16 vfpv3 vfpv3-d16-fp
188 # it seems to work ok. 188 # it seems to work ok.
189 v8_fps := simd fp16 crypto fp16+crypto dotprod fp16fml 189 v8_fps := simd fp16 crypto fp16+crypto dotprod fp16fml
190 190
@@ -202,7 +202,7 @@ index d68def308..b3a900e8c 100644
202 # No floating point variants, require thumb1 softfp 202 # No floating point variants, require thumb1 softfp
203 all_nofp_t := armv6-m armv6s-m armv8-m.base 203 all_nofp_t := armv6-m armv6s-m armv8-m.base
204 204
205@@ -110,6 +114,11 @@ MULTILIB_MATCHES += $(foreach ARCH, $(all_v8_archs), \ 205@@ -110,6 +114,11 @@ MULTILIB_MATCHES += $(foreach ARCH,
206 $(foreach FPARCH, $(v8_fps), \ 206 $(foreach FPARCH, $(v8_fps), \
207 march?armv7+fp=march?$(ARCH)+$(FPARCH))) 207 march?armv7+fp=march?$(ARCH)+$(FPARCH)))
208 208
@@ -214,11 +214,11 @@ index d68def308..b3a900e8c 100644
214 MULTILIB_MATCHES += $(foreach ARCH, armv7e-m armv8-m.mainline, \ 214 MULTILIB_MATCHES += $(foreach ARCH, armv7e-m armv8-m.mainline, \
215 march?armv7+fp=march?$(ARCH)+fp.dp) 215 march?armv7+fp=march?$(ARCH)+fp.dp)
216 216
217diff --git a/gcc/config/arm/t-multilib b/gcc/config/arm/t-multilib 217Index: gcc-11.3.0/gcc/config/arm/t-multilib
218index ddc5033bf..d789b86ee 100644 218===================================================================
219--- a/gcc/config/arm/t-multilib 219--- gcc-11.3.0.orig/gcc/config/arm/t-multilib
220+++ b/gcc/config/arm/t-multilib 220+++ gcc-11.3.0/gcc/config/arm/t-multilib
221@@ -78,6 +78,8 @@ v8_4_a_simd_variants := $(call all_feat_combs, simd fp16 crypto i8mm bf16) 221@@ -78,6 +78,8 @@ v8_4_a_simd_variants := $(call all_feat_
222 v8_5_a_simd_variants := $(call all_feat_combs, simd fp16 crypto i8mm bf16) 222 v8_5_a_simd_variants := $(call all_feat_combs, simd fp16 crypto i8mm bf16)
223 v8_6_a_simd_variants := $(call all_feat_combs, simd fp16 crypto i8mm bf16) 223 v8_6_a_simd_variants := $(call all_feat_combs, simd fp16 crypto i8mm bf16)
224 v8_r_nosimd_variants := +crc 224 v8_r_nosimd_variants := +crc
@@ -227,7 +227,7 @@ index ddc5033bf..d789b86ee 100644
227 227
228 ifneq (,$(HAS_APROFILE)) 228 ifneq (,$(HAS_APROFILE))
229 include $(srcdir)/config/arm/t-aprofile 229 include $(srcdir)/config/arm/t-aprofile
230@@ -202,6 +204,16 @@ MULTILIB_MATCHES += march?armv7=march?armv8.6-a 230@@ -202,6 +204,16 @@ MULTILIB_MATCHES += march?armv7=march?ar
231 MULTILIB_MATCHES += $(foreach ARCH, $(v8_6_a_simd_variants), \ 231 MULTILIB_MATCHES += $(foreach ARCH, $(v8_6_a_simd_variants), \
232 march?armv7+fp=march?armv8.6-a$(ARCH)) 232 march?armv7+fp=march?armv8.6-a$(ARCH))
233 233
@@ -244,10 +244,10 @@ index ddc5033bf..d789b86ee 100644
244 endif # Not APROFILE. 244 endif # Not APROFILE.
245 245
246 # Use Thumb libraries for everything. 246 # Use Thumb libraries for everything.
247diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi 247Index: gcc-11.3.0/gcc/doc/invoke.texi
248index 7184a62d0..9a712c0d6 100644 248===================================================================
249--- a/gcc/doc/invoke.texi 249--- gcc-11.3.0.orig/gcc/doc/invoke.texi
250+++ b/gcc/doc/invoke.texi 250+++ gcc-11.3.0/gcc/doc/invoke.texi
251@@ -19701,6 +19701,7 @@ Permissible names are: 251@@ -19701,6 +19701,7 @@ Permissible names are:
252 @samp{armv7-m}, @samp{armv7e-m}, 252 @samp{armv7-m}, @samp{armv7e-m},
253 @samp{armv8-m.base}, @samp{armv8-m.main}, 253 @samp{armv8-m.base}, @samp{armv8-m.main},
@@ -256,10 +256,10 @@ index 7184a62d0..9a712c0d6 100644
256 @samp{iwmmxt} and @samp{iwmmxt2}. 256 @samp{iwmmxt} and @samp{iwmmxt2}.
257 257
258 Additionally, the following architectures, which lack support for the 258 Additionally, the following architectures, which lack support for the
259diff --git a/gcc/testsuite/gcc.target/arm/multilib.exp b/gcc/testsuite/gcc.target/arm/multilib.exp 259Index: gcc-11.3.0/gcc/testsuite/gcc.target/arm/multilib.exp
260index 4b30025db..e3f06c316 100644 260===================================================================
261--- a/gcc/testsuite/gcc.target/arm/multilib.exp 261--- gcc-11.3.0.orig/gcc/testsuite/gcc.target/arm/multilib.exp
262+++ b/gcc/testsuite/gcc.target/arm/multilib.exp 262+++ gcc-11.3.0/gcc/testsuite/gcc.target/arm/multilib.exp
263@@ -135,6 +135,14 @@ if {[multilib_config "aprofile"] } { 263@@ -135,6 +135,14 @@ if {[multilib_config "aprofile"] } {
264 {-march=armv8.6-a+simd+fp16 -mfloat-abi=softfp} "thumb/v8-a+simd/softfp" 264 {-march=armv8.6-a+simd+fp16 -mfloat-abi=softfp} "thumb/v8-a+simd/softfp"
265 {-march=armv8.6-a+simd+fp16+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp" 265 {-march=armv8.6-a+simd+fp16+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp"
@@ -275,10 +275,10 @@ index 4b30025db..e3f06c316 100644
275 {-mcpu=cortex-a53+crypto -mfloat-abi=hard} "thumb/v8-a+simd/hard" 275 {-mcpu=cortex-a53+crypto -mfloat-abi=hard} "thumb/v8-a+simd/hard"
276 {-mcpu=cortex-a53+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp" 276 {-mcpu=cortex-a53+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp"
277 {-march=armv8-a+crc -mfloat-abi=hard -mfpu=vfp} "thumb/v8-a+simd/hard" 277 {-march=armv8-a+crc -mfloat-abi=hard -mfpu=vfp} "thumb/v8-a+simd/hard"
278diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp 278Index: gcc-11.3.0/gcc/testsuite/lib/target-supports.exp
279index 857e57218..52e043917 100644 279===================================================================
280--- a/gcc/testsuite/lib/target-supports.exp 280--- gcc-11.3.0.orig/gcc/testsuite/lib/target-supports.exp
281+++ b/gcc/testsuite/lib/target-supports.exp 281+++ gcc-11.3.0/gcc/testsuite/lib/target-supports.exp
282@@ -4820,7 +4820,8 @@ foreach { armfunc armflag armdefs } { 282@@ -4820,7 +4820,8 @@ foreach { armfunc armflag armdefs } {
283 v8m_base "-march=armv8-m.base -mthumb -mfloat-abi=soft" 283 v8m_base "-march=armv8-m.base -mthumb -mfloat-abi=soft"
284 __ARM_ARCH_8M_BASE__ 284 __ARM_ARCH_8M_BASE__
@@ -289,6 +289,3 @@ index 857e57218..52e043917 100644
289 eval [string map [list FUNC $armfunc FLAG $armflag DEFS $armdefs ] { 289 eval [string map [list FUNC $armfunc FLAG $armflag DEFS $armdefs ] {
290 proc check_effective_target_arm_arch_FUNC_ok { } { 290 proc check_effective_target_arm_arch_FUNC_ok { } {
291 return [check_no_compiler_messages arm_arch_FUNC_ok assembly { 291 return [check_no_compiler_messages arm_arch_FUNC_ok assembly {
292--
2932.34.1
294
diff --git a/meta/recipes-devtools/gcc/gcc/0006-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/meta/recipes-devtools/gcc/gcc/0006-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
index ef19eef822..b3515c9734 100644
--- a/meta/recipes-devtools/gcc/gcc/0006-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ b/meta/recipes-devtools/gcc/gcc/0006-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
@@ -1,4 +1,4 @@
1From 84dd8ea4c982fc2c82af642293d29e9c1880de5b Mon Sep 17 00:00:00 2001 1From 4de00af67b57b5440bdf61ab364ad959ad0aeee7 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 29 Mar 2013 09:24:50 +0400 3Date: Fri, 29 Mar 2013 09:24:50 +0400
4Subject: [PATCH] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER 4Subject: [PATCH] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
@@ -12,28 +12,37 @@ SH, sparc, alpha for possible future support (if any)
12 12
13Removes the do_headerfix task in metadata 13Removes the do_headerfix task in metadata
14 14
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16
15Upstream-Status: Inappropriate [OE configuration] 17Upstream-Status: Inappropriate [OE configuration]
16Signed-off-by: Khem Raj <raj.khem@gmail.com> 18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19
20Refresh patch from master to deduplicate patches and fix arm linker
21Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
17--- 22---
18 gcc/config/aarch64/aarch64-linux.h | 4 ++-- 23 gcc/config/aarch64/aarch64-linux.h | 4 ++--
19 gcc/config/alpha/linux-elf.h | 4 ++-- 24 gcc/config/alpha/linux-elf.h | 4 ++--
20 gcc/config/arm/linux-eabi.h | 4 ++-- 25 gcc/config/arm/linux-eabi.h | 6 +++---
21 gcc/config/arm/linux-elf.h | 2 +- 26 gcc/config/arm/linux-elf.h | 2 +-
22 gcc/config/i386/linux.h | 2 +- 27 gcc/config/i386/linux.h | 4 ++--
23 gcc/config/i386/linux64.h | 6 +++--- 28 gcc/config/i386/linux64.h | 12 ++++++------
24 gcc/config/linux.h | 8 ++++---- 29 gcc/config/linux.h | 8 ++++----
25 gcc/config/mips/linux.h | 12 ++++++------ 30 gcc/config/microblaze/linux.h | 4 ++--
26 gcc/config/riscv/linux.h | 2 +- 31 gcc/config/mips/linux.h | 18 +++++++++---------
32 gcc/config/nios2/linux.h | 4 ++--
33 gcc/config/riscv/linux.h | 4 ++--
27 gcc/config/rs6000/linux64.h | 15 +++++---------- 34 gcc/config/rs6000/linux64.h | 15 +++++----------
28 gcc/config/sh/linux.h | 2 +- 35 gcc/config/rs6000/sysv4.h | 4 ++--
36 gcc/config/s390/linux.h | 8 ++++----
37 gcc/config/sh/linux.h | 4 ++--
29 gcc/config/sparc/linux.h | 2 +- 38 gcc/config/sparc/linux.h | 2 +-
30 gcc/config/sparc/linux64.h | 4 ++-- 39 gcc/config/sparc/linux64.h | 4 ++--
31 13 files changed, 31 insertions(+), 36 deletions(-) 40 17 files changed, 53 insertions(+), 58 deletions(-)
32 41
33diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h 42Index: gcc-11.3.0/gcc/config/aarch64/aarch64-linux.h
34index 7f2529a2a1d..4bcae7f3110 100644 43===================================================================
35--- a/gcc/config/aarch64/aarch64-linux.h 44--- gcc-11.3.0.orig/gcc/config/aarch64/aarch64-linux.h
36+++ b/gcc/config/aarch64/aarch64-linux.h 45+++ gcc-11.3.0/gcc/config/aarch64/aarch64-linux.h
37@@ -21,10 +21,10 @@ 46@@ -21,10 +21,10 @@
38 #ifndef GCC_AARCH64_LINUX_H 47 #ifndef GCC_AARCH64_LINUX_H
39 #define GCC_AARCH64_LINUX_H 48 #define GCC_AARCH64_LINUX_H
@@ -47,11 +56,11 @@ index 7f2529a2a1d..4bcae7f3110 100644
47 56
48 #undef ASAN_CC1_SPEC 57 #undef ASAN_CC1_SPEC
49 #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" 58 #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
50diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h 59Index: gcc-11.3.0/gcc/config/alpha/linux-elf.h
51index c1dae8ca2cf..3ce2b76c1a4 100644 60===================================================================
52--- a/gcc/config/alpha/linux-elf.h 61--- gcc-11.3.0.orig/gcc/config/alpha/linux-elf.h
53+++ b/gcc/config/alpha/linux-elf.h 62+++ gcc-11.3.0/gcc/config/alpha/linux-elf.h
54@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see 63@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3.
55 #define EXTRA_SPECS \ 64 #define EXTRA_SPECS \
56 { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, 65 { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
57 66
@@ -62,10 +71,10 @@ index c1dae8ca2cf..3ce2b76c1a4 100644
62 #if DEFAULT_LIBC == LIBC_UCLIBC 71 #if DEFAULT_LIBC == LIBC_UCLIBC
63 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" 72 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
64 #elif DEFAULT_LIBC == LIBC_GLIBC 73 #elif DEFAULT_LIBC == LIBC_GLIBC
65diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h 74Index: gcc-11.3.0/gcc/config/arm/linux-eabi.h
66index 85d0136e76e..6bd95855827 100644 75===================================================================
67--- a/gcc/config/arm/linux-eabi.h 76--- gcc-11.3.0.orig/gcc/config/arm/linux-eabi.h
68+++ b/gcc/config/arm/linux-eabi.h 77+++ gcc-11.3.0/gcc/config/arm/linux-eabi.h
69@@ -65,8 +65,8 @@ 78@@ -65,8 +65,8 @@
70 GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ 79 GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
71 80
@@ -77,10 +86,19 @@ index 85d0136e76e..6bd95855827 100644
77 #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT 86 #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
78 87
79 #define GLIBC_DYNAMIC_LINKER \ 88 #define GLIBC_DYNAMIC_LINKER \
80diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h 89@@ -89,7 +89,7 @@
81index 0c1c4e70b6b..6bd643ade11 100644 90 #define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
82--- a/gcc/config/arm/linux-elf.h 91 #endif
83+++ b/gcc/config/arm/linux-elf.h 92 #define MUSL_DYNAMIC_LINKER \
93- "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1"
94+ SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1"
95
96 /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
97 use the GNU/Linux version, not the generic BPABI version. */
98Index: gcc-11.3.0/gcc/config/arm/linux-elf.h
99===================================================================
100--- gcc-11.3.0.orig/gcc/config/arm/linux-elf.h
101+++ gcc-11.3.0/gcc/config/arm/linux-elf.h
84@@ -60,7 +60,7 @@ 102@@ -60,7 +60,7 @@
85 103
86 #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" 104 #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
@@ -90,11 +108,11 @@ index 0c1c4e70b6b..6bd643ade11 100644
90 108
91 #define LINUX_TARGET_LINK_SPEC "%{h*} \ 109 #define LINUX_TARGET_LINK_SPEC "%{h*} \
92 %{static:-Bstatic} \ 110 %{static:-Bstatic} \
93diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h 111Index: gcc-11.3.0/gcc/config/i386/linux.h
94index 04b274f1654..7aafcf3ac2d 100644 112===================================================================
95--- a/gcc/config/i386/linux.h 113--- gcc-11.3.0.orig/gcc/config/i386/linux.h
96+++ b/gcc/config/i386/linux.h 114+++ gcc-11.3.0/gcc/config/i386/linux.h
97@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see 115@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3.
98 <http://www.gnu.org/licenses/>. */ 116 <http://www.gnu.org/licenses/>. */
99 117
100 #define GNU_USER_LINK_EMULATION "elf_i386" 118 #define GNU_USER_LINK_EMULATION "elf_i386"
@@ -102,12 +120,13 @@ index 04b274f1654..7aafcf3ac2d 100644
102+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" 120+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
103 121
104 #undef MUSL_DYNAMIC_LINKER 122 #undef MUSL_DYNAMIC_LINKER
105 #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" 123-#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
106diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h 124+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-i386.so.1"
107index b3822ced528..92d303e80d6 100644 125Index: gcc-11.3.0/gcc/config/i386/linux64.h
108--- a/gcc/config/i386/linux64.h 126===================================================================
109+++ b/gcc/config/i386/linux64.h 127--- gcc-11.3.0.orig/gcc/config/i386/linux64.h
110@@ -27,9 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 128+++ gcc-11.3.0/gcc/config/i386/linux64.h
129@@ -27,13 +27,13 @@ see the files COPYING3 and COPYING.RUNTI
111 #define GNU_USER_LINK_EMULATION64 "elf_x86_64" 130 #define GNU_USER_LINK_EMULATION64 "elf_x86_64"
112 #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" 131 #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
113 132
@@ -119,12 +138,19 @@ index b3822ced528..92d303e80d6 100644
119+#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2" 138+#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
120 139
121 #undef MUSL_DYNAMIC_LINKER32 140 #undef MUSL_DYNAMIC_LINKER32
122 #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" 141-#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
123diff --git a/gcc/config/linux.h b/gcc/config/linux.h 142+#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-i386.so.1"
124index 4e1db60fced..87efc5f69fe 100644 143 #undef MUSL_DYNAMIC_LINKER64
125--- a/gcc/config/linux.h 144-#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
126+++ b/gcc/config/linux.h 145+#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-x86_64.so.1"
127@@ -94,10 +94,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 146 #undef MUSL_DYNAMIC_LINKERX32
147-#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
148+#define MUSL_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-musl-x32.so.1"
149Index: gcc-11.3.0/gcc/config/linux.h
150===================================================================
151--- gcc-11.3.0.orig/gcc/config/linux.h
152+++ gcc-11.3.0/gcc/config/linux.h
153@@ -94,10 +94,10 @@ see the files COPYING3 and COPYING.RUNTI
128 GLIBC_DYNAMIC_LINKER must be defined for each target using them, or 154 GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
129 GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets 155 GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
130 supporting both 32-bit and 64-bit compilation. */ 156 supporting both 32-bit and 64-bit compilation. */
@@ -139,11 +165,33 @@ index 4e1db60fced..87efc5f69fe 100644
139 #define BIONIC_DYNAMIC_LINKER "/system/bin/linker" 165 #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
140 #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" 166 #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
141 #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" 167 #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
142diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h 168Index: gcc-11.3.0/gcc/config/microblaze/linux.h
143index 44a85e410d9..8d41b5574f6 100644 169===================================================================
144--- a/gcc/config/mips/linux.h 170--- gcc-11.3.0.orig/gcc/config/microblaze/linux.h
145+++ b/gcc/config/mips/linux.h 171+++ gcc-11.3.0/gcc/config/microblaze/linux.h
146@@ -22,20 +22,20 @@ along with GCC; see the file COPYING3. If not see 172@@ -28,7 +28,7 @@
173 #undef TLS_NEEDS_GOT
174 #define TLS_NEEDS_GOT 1
175
176-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
177+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "/ld.so.1"
178 #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
179
180 #if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */
181@@ -38,7 +38,7 @@
182 #endif
183
184 #undef MUSL_DYNAMIC_LINKER
185-#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1"
186+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1"
187
188 #undef SUBTARGET_EXTRA_SPECS
189 #define SUBTARGET_EXTRA_SPECS \
190Index: gcc-11.3.0/gcc/config/mips/linux.h
191===================================================================
192--- gcc-11.3.0.orig/gcc/config/mips/linux.h
193+++ gcc-11.3.0/gcc/config/mips/linux.h
194@@ -22,29 +22,29 @@ along with GCC; see the file COPYING3.
147 #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" 195 #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
148 196
149 #define GLIBC_DYNAMIC_LINKER32 \ 197 #define GLIBC_DYNAMIC_LINKER32 \
@@ -170,11 +218,36 @@ index 44a85e410d9..8d41b5574f6 100644
170 218
171 #undef MUSL_DYNAMIC_LINKER32 219 #undef MUSL_DYNAMIC_LINKER32
172 #define MUSL_DYNAMIC_LINKER32 \ 220 #define MUSL_DYNAMIC_LINKER32 \
173diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h 221- "/lib/ld-musl-mips%{mips32r6|mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
174index fce5b896e6e..03aa55cb5ab 100644 222+ SYSTEMLIBS_DIR "ld-musl-mips%{mips32r6|mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
175--- a/gcc/config/riscv/linux.h 223 #undef MUSL_DYNAMIC_LINKER64
176+++ b/gcc/config/riscv/linux.h 224 #define MUSL_DYNAMIC_LINKER64 \
177@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. If not see 225- "/lib/ld-musl-mips64%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
226+ SYSTEMLIBS_DIR "ld-musl-mips64%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
227 #define MUSL_DYNAMIC_LINKERN32 \
228- "/lib/ld-musl-mipsn32%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
229+ SYSTEMLIBS_DIR "ld-musl-mipsn32%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
230
231 #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
232 #define GNU_USER_DYNAMIC_LINKERN32 \
233Index: gcc-11.3.0/gcc/config/nios2/linux.h
234===================================================================
235--- gcc-11.3.0.orig/gcc/config/nios2/linux.h
236+++ gcc-11.3.0/gcc/config/nios2/linux.h
237@@ -29,7 +29,7 @@
238 #undef CPP_SPEC
239 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
240
241-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1"
242+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-nios2.so.1"
243
244 #undef LINK_SPEC
245 #define LINK_SPEC LINK_SPEC_ENDIAN \
246Index: gcc-11.3.0/gcc/config/riscv/linux.h
247===================================================================
248--- gcc-11.3.0.orig/gcc/config/riscv/linux.h
249+++ gcc-11.3.0/gcc/config/riscv/linux.h
250@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3.
178 GNU_USER_TARGET_OS_CPP_BUILTINS(); \ 251 GNU_USER_TARGET_OS_CPP_BUILTINS(); \
179 } while (0) 252 } while (0)
180 253
@@ -183,10 +256,19 @@ index fce5b896e6e..03aa55cb5ab 100644
183 256
184 #define MUSL_ABI_SUFFIX \ 257 #define MUSL_ABI_SUFFIX \
185 "%{mabi=ilp32:-sf}" \ 258 "%{mabi=ilp32:-sf}" \
186diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h 259@@ -33,7 +33,7 @@ along with GCC; see the file COPYING3.
187index e3f2cd254f6..a11e01faa3d 100644 260 "%{mabi=lp64d:}"
188--- a/gcc/config/rs6000/linux64.h 261
189+++ b/gcc/config/rs6000/linux64.h 262 #undef MUSL_DYNAMIC_LINKER
263-#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1"
264+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1"
265
266 /* Because RISC-V only has word-sized atomics, it requries libatomic where
267 others do not. So link libatomic by default, as needed. */
268Index: gcc-11.3.0/gcc/config/rs6000/linux64.h
269===================================================================
270--- gcc-11.3.0.orig/gcc/config/rs6000/linux64.h
271+++ gcc-11.3.0/gcc/config/rs6000/linux64.h
190@@ -336,24 +336,19 @@ extern int dot_symbols; 272@@ -336,24 +336,19 @@ extern int dot_symbols;
191 #undef LINK_OS_DEFAULT_SPEC 273 #undef LINK_OS_DEFAULT_SPEC
192 #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" 274 #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
@@ -217,12 +299,55 @@ index e3f2cd254f6..a11e01faa3d 100644
217 299
218 #undef DEFAULT_ASM_ENDIAN 300 #undef DEFAULT_ASM_ENDIAN
219 #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) 301 #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
220diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h 302Index: gcc-11.3.0/gcc/config/rs6000/sysv4.h
221index 7558d2f7195..3aaa6c3a078 100644 303===================================================================
222--- a/gcc/config/sh/linux.h 304--- gcc-11.3.0.orig/gcc/config/rs6000/sysv4.h
223+++ b/gcc/config/sh/linux.h 305+++ gcc-11.3.0/gcc/config/rs6000/sysv4.h
224@@ -64,7 +64,7 @@ along with GCC; see the file COPYING3. If not see 306@@ -780,10 +780,10 @@ GNU_USER_TARGET_CC1_SPEC
225 "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \ 307
308 #define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","")
309
310-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
311+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld.so.1"
312 #undef MUSL_DYNAMIC_LINKER
313 #define MUSL_DYNAMIC_LINKER \
314- "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
315+ SYSTEMLIBS_DIR "ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
316
317 #ifndef GNU_USER_DYNAMIC_LINKER
318 #define GNU_USER_DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
319Index: gcc-11.3.0/gcc/config/s390/linux.h
320===================================================================
321--- gcc-11.3.0.orig/gcc/config/s390/linux.h
322+++ gcc-11.3.0/gcc/config/s390/linux.h
323@@ -72,13 +72,13 @@ along with GCC; see the file COPYING3.
324 #define MULTILIB_DEFAULTS { "m31" }
325 #endif
326
327-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
328-#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
329+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1"
330+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64.so.1"
331
332 #undef MUSL_DYNAMIC_LINKER32
333-#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-s390.so.1"
334+#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-s390.so.1"
335 #undef MUSL_DYNAMIC_LINKER64
336-#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-s390x.so.1"
337+#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-s390x.so.1"
338
339 #undef LINK_SPEC
340 #define LINK_SPEC \
341Index: gcc-11.3.0/gcc/config/sh/linux.h
342===================================================================
343--- gcc-11.3.0.orig/gcc/config/sh/linux.h
344+++ gcc-11.3.0/gcc/config/sh/linux.h
345@@ -61,10 +61,10 @@ along with GCC; see the file COPYING3.
346
347 #undef MUSL_DYNAMIC_LINKER
348 #define MUSL_DYNAMIC_LINKER \
349- "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \
350+ SYSTEMLIBS_DIR "ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \
226 "%{mfdpic:-fdpic}.so.1" 351 "%{mfdpic:-fdpic}.so.1"
227 352
228-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" 353-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
@@ -230,11 +355,11 @@ index 7558d2f7195..3aaa6c3a078 100644
230 355
231 #undef SUBTARGET_LINK_EMUL_SUFFIX 356 #undef SUBTARGET_LINK_EMUL_SUFFIX
232 #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}" 357 #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}"
233diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h 358Index: gcc-11.3.0/gcc/config/sparc/linux.h
234index 2550d7ee8f0..a94f4cd8ba2 100644 359===================================================================
235--- a/gcc/config/sparc/linux.h 360--- gcc-11.3.0.orig/gcc/config/sparc/linux.h
236+++ b/gcc/config/sparc/linux.h 361+++ gcc-11.3.0/gcc/config/sparc/linux.h
237@@ -78,7 +78,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); 362@@ -78,7 +78,7 @@ extern const char *host_detect_local_cpu
238 When the -shared link option is used a final link is not being 363 When the -shared link option is used a final link is not being
239 done. */ 364 done. */
240 365
@@ -243,11 +368,11 @@ index 2550d7ee8f0..a94f4cd8ba2 100644
243 368
244 #undef LINK_SPEC 369 #undef LINK_SPEC
245 #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ 370 #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
246diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h 371Index: gcc-11.3.0/gcc/config/sparc/linux64.h
247index 95af8afa9b5..63127afb074 100644 372===================================================================
248--- a/gcc/config/sparc/linux64.h 373--- gcc-11.3.0.orig/gcc/config/sparc/linux64.h
249+++ b/gcc/config/sparc/linux64.h 374+++ gcc-11.3.0/gcc/config/sparc/linux64.h
250@@ -78,8 +78,8 @@ along with GCC; see the file COPYING3. If not see 375@@ -78,8 +78,8 @@ along with GCC; see the file COPYING3.
251 When the -shared link option is used a final link is not being 376 When the -shared link option is used a final link is not being
252 done. */ 377 done. */
253 378
diff --git a/meta/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/meta/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
index ac139542f1..0f94936140 100644
--- a/meta/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
+++ b/meta/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
@@ -18,13 +18,13 @@ Upstream-Status: Pending
18 gcc/config/arm/linux-eabi.h | 6 +++++- 18 gcc/config/arm/linux-eabi.h | 6 +++++-
19 1 file changed, 5 insertions(+), 1 deletion(-) 19 1 file changed, 5 insertions(+), 1 deletion(-)
20 20
21diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h 21Index: gcc-11.3.0/gcc/config/arm/linux-eabi.h
22index 6bd95855827..77befab5da8 100644 22===================================================================
23--- a/gcc/config/arm/linux-eabi.h 23--- gcc-11.3.0.orig/gcc/config/arm/linux-eabi.h
24+++ b/gcc/config/arm/linux-eabi.h 24+++ gcc-11.3.0/gcc/config/arm/linux-eabi.h
25@@ -91,10 +91,14 @@ 25@@ -91,10 +91,14 @@
26 #define MUSL_DYNAMIC_LINKER \ 26 #define MUSL_DYNAMIC_LINKER \
27 "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" 27 SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1"
28 28
29+/* For armv4 we pass --fix-v4bx to linker to support EABI */ 29+/* For armv4 we pass --fix-v4bx to linker to support EABI */
30+#undef TARGET_FIX_V4BX_SPEC 30+#undef TARGET_FIX_V4BX_SPEC
diff --git a/meta/recipes-devtools/gcc/gcc/0019-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/meta/recipes-devtools/gcc/gcc/0019-nios2-Define-MUSL_DYNAMIC_LINKER.patch
deleted file mode 100644
index 76ebfd7f77..0000000000
--- a/meta/recipes-devtools/gcc/gcc/0019-nios2-Define-MUSL_DYNAMIC_LINKER.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1From 9ec4db8e910d9a51ae43f6b20d4bf1dac2d8cca8 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 2 Feb 2016 10:26:10 -0800
4Subject: [PATCH] nios2: Define MUSL_DYNAMIC_LINKER
5
6Upstream-Status: Backport [https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=e5ddbbf992b909d8e38851bd3179d29389e6ac97]
7
8Signed-off-by: Marek Vasut <marex@denx.de>
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 gcc/config/nios2/linux.h | 1 +
12 1 file changed, 1 insertion(+)
13
14diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h
15index 08edf1521f6..15696d86241 100644
16--- a/gcc/config/nios2/linux.h
17+++ b/gcc/config/nios2/linux.h
18@@ -30,6 +30,7 @@
19 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
20
21 #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1"
22+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-nios2.so.1"
23
24 #undef LINK_SPEC
25 #define LINK_SPEC LINK_SPEC_ENDIAN \