11diff --git a/gcc/config.gcc b/gcc/config.gcc
2- index 648b3dc2110..ed605b28956 100644
2+ index 95c91ee02be..4711542eee5 100644
33--- a/gcc/config.gcc
44+++ b/gcc/config.gcc
5- @@ -1132 ,7 +1132 ,14 @@ aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*)
5+ @@ -1195 ,7 +1195 ,14 @@ aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*)
66 tmake_file="${tmake_file} aarch64/t-aarch64"
77 case $target in
88 aarch64-*-elf*)
@@ -18,7 +18,7 @@ index 648b3dc2110..ed605b28956 100644
1818 aarch64-*-fuchsia*)
1919 tm_file="${tm_file} fuchsia.h"
2020diff --git a/gcc/config/aarch64/aarch64-elf-raw.h b/gcc/config/aarch64/aarch64-elf-raw.h
21- index ec45f23fa41..a208eabd806 100644
21+ index 5396da9b2d6..87235d680ad 100644
2222--- a/gcc/config/aarch64/aarch64-elf-raw.h
2323+++ b/gcc/config/aarch64/aarch64-elf-raw.h
2424@@ -22,6 +22,7 @@
@@ -30,27 +30,24 @@ index ec45f23fa41..a208eabd806 100644
3030 #define ENDFILE_SPEC \
3131 " crtend%O%s crtn%O%s " \
3232diff --git a/gcc/config/aarch64/aarch64-opts.h b/gcc/config/aarch64/aarch64-opts.h
33- index a9f3e2715ca..0c7304e1d81 100644
33+ index a05c0d3ded1..5551807e4c6 100644
3434--- a/gcc/config/aarch64/aarch64-opts.h
3535+++ b/gcc/config/aarch64/aarch64-opts.h
36- @@ -52,6 +52,12 @@ enum aarch64_tls_type {
37- TLS_DESCRIPTORS
36+ @@ -80,7 +80,8 @@ enum aarch64_tp_reg {
37+ AARCH64_TPIDR_EL1 = 1,
38+ AARCH64_TPIDR_EL2 = 2,
39+ AARCH64_TPIDR_EL3 = 3,
40+ - AARCH64_TPIDRRO_EL0 = 4
41+ + AARCH64_TPIDRRO_EL0 = 4,
42+ + AARCH64_TP_SOFT = 5
3843 };
3944
40- + /* Which thread pointer access sequence to use. */
41- + enum aarch64_tp_type {
42- + TP_HARD,
43- + TP_SOFT
44- + };
45- +
46- /* The code model defines the address generation strategy.
47- Most have a PIC and non-PIC variant. */
48- enum aarch64_code_model {
45+ /* SVE vector register sizes. */
4946diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
50- index f5db5379543..f582e5a7543 100644
47+ index 1beec94629d..90a9ec580f8 100644
5148--- a/gcc/config/aarch64/aarch64.cc
5249+++ b/gcc/config/aarch64/aarch64.cc
53- @@ -19550 ,8 +19550 ,24 @@ aarch64_load_tp (rtx target)
50+ @@ -21060 ,8 +21060 ,24 @@ aarch64_load_tp (rtx target)
5451 || !register_operand (target, Pmode))
5552 target = gen_reg_rtx (Pmode);
5653
@@ -78,32 +75,31 @@ index f5db5379543..f582e5a7543 100644
7875 }
7976
8077diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
81- index 73b09e20508..ad62b5080cc 100644
78+ index 4fa1dfc7906..085ae3234e6 100644
8279--- a/gcc/config/aarch64/aarch64.h
8380+++ b/gcc/config/aarch64/aarch64.h
84- @@ -1154 ,6 +1154 ,10 @@ typedef struct
81+ @@ -1377 ,6 +1377 ,10 @@ typedef struct
8582 /* Check TLS Descriptors mechanism is selected. */
8683 #define TARGET_TLS_DESC (aarch64_tls_dialect == TLS_DESCRIPTORS)
8784
8885+ /* Check selected thread pointer access sequence to use. */
89- + #define TARGET_HARD_TP (target_thread_pointer == TP_HARD )
90- + #define TARGET_SOFT_TP (target_thread_pointer == TP_SOFT )
86+ + #define TARGET_HARD_TP (aarch64_tpidr_register != AARCH64_TP_SOFT )
87+ + #define TARGET_SOFT_TP (aarch64_tpidr_register == AARCH64_TP_SOFT )
9188+
9289 extern enum aarch64_code_model aarch64_cmodel;
9390
9491 /* When using the tiny addressing model conditional and unconditional branches
9592diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
96- index 36d0bb3f718..cfa2f7efc7f 100644
93+ index dbde066f747..3e3198bf52f 100644
9794--- a/gcc/config/aarch64/aarch64.md
9895+++ b/gcc/config/aarch64/aarch64.md
99- @@ -7068 ,11 +7068 ,22 @@
96+ @@ -7436 ,11 +7436 ,22 @@
10097 (define_insn "aarch64_load_tp_hard"
10198 [(set (match_operand:DI 0 "register_operand" "=r")
10299 (unspec:DI [(const_int 0)] UNSPEC_TLS))]
103100- ""
104- - "mrs\\t%0, tpidr_el0"
105101+ "TARGET_HARD_TP"
106- + "mrs\\t%0, tpidr_el0\\t// aarch64_load_tp_hard "
102+ "* return aarch64_output_load_tp (operands[0]); "
107103 [(set_attr "type" "mrs")]
108104 )
109105
@@ -122,46 +118,34 @@ index 36d0bb3f718..cfa2f7efc7f 100644
122118 ;; instructions in the TLS stubs, in order to enable linker relaxation.
123119 ;; Therefore we treat the stubs as an atomic sequence.
124120diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt
125- index 1d7967db9c0..17870f18b8b 100644
121+ index 6356c419399..a6907ed0a0b 100644
126122--- a/gcc/config/aarch64/aarch64.opt
127123+++ b/gcc/config/aarch64/aarch64.opt
128- @@ -128,6 +128,21 @@ Enum(aarch64_tls_size ) String(32 ) Value(32 )
124+ @@ -128,6 +128,9 @@ Enum(tp_reg ) String(tpidr_el3 ) Value(AARCH64_TPIDR_EL3 )
129125 EnumValue
130- Enum(aarch64_tls_size ) String(48 ) Value(48 )
126+ Enum(tp_reg ) String(tpidrro_el0 ) Value(AARCH64_TPIDRRO_EL0 )
131127
132- + mtp=
133- + Target RejectNegative Joined Enum(aarch64_tp_type) Var(target_thread_pointer) Init(TP_HARD)
134- + Specify how to access the thread pointer.
135- +
136- + Enum
137- + Name(aarch64_tp_type) Type(enum aarch64_tp_type)
138- + Valid arguments to -mtp=:
139- +
140- + EnumValue
141- + Enum(aarch64_tp_type) String(hard) Value(TP_HARD)
142- +
143128+ EnumValue
144- + Enum(aarch64_tp_type) String(soft) Value(TP_SOFT)
145- +
129+ + Enum(tp_reg) String(soft) Value(AARCH64_TP_SOFT)
146130+
147- march =
148- Target RejectNegative Negative(march=) ToLower Joined Var(aarch64_arch_string)
149- Use features of architecture ARCH .
150- @@ -266 ,7 +281 ,7 @@ TargetVariable
131+ mtp =
132+ Target RejectNegative Joined Enum(tp_reg) Var(aarch64_tpidr_reg) Init(AARCH64_TPIDR_EL0) Save
133+ Specify the thread pointer register .
134+ @@ -329 ,7 +332 ,7 @@ TargetVariable
151135 long aarch64_stack_protector_guard_offset = 0
152136
153137 moutline-atomics
154138- Target Var(aarch64_flag_outline_atomics) Init(2) Save
155139+ Target Var(aarch64_flag_outline_atomics) Save
156140 Generate local calls to out-of-line atomic operations.
157141
158- -param=aarch64-sve -compare-costs=
142+ -param=aarch64-vect -compare-costs=
159143diff --git a/gcc/config/aarch64/t-aarch64 b/gcc/config/aarch64/t-aarch64
160- index a9a244ab6d6..a29f2772d63 100644
144+ index 78713558e7d..76c0914d8ce 100644
161145--- a/gcc/config/aarch64/t-aarch64
162146+++ b/gcc/config/aarch64/t-aarch64
163- @@ -177 ,8 +177 ,10 @@ aarch64-cc -fusion.o: $(srcdir)/config/aarch64/aarch64-cc -fusion.cc \
164- $(srcdir)/config/aarch64/aarch64-cc -fusion.cc
147+ @@ -208 ,8 +208 ,10 @@ aarch64-ldp -fusion.o: $(srcdir)/config/aarch64/aarch64-ldp -fusion.cc \
148+ $(srcdir)/config/aarch64/aarch64-ldp -fusion.cc
165149
166150 comma=,
167151- MULTILIB_OPTIONS = $(subst $(comma),/, $(patsubst %, mabi=%, $(subst $(comma),$(comma)mabi=,$(TM_MULTILIB_CONFIG))))
@@ -246,8 +230,15 @@ index 00000000000..9acbbf9d27c
246230+ Driver
247231+
248232+ ; This comment is to ensure we retain the blank line above.
233+ diff --git a/gcc/config/devkitpro.opt.urls b/gcc/config/devkitpro.opt.urls
234+ new file mode 100644
235+ index 00000000000..ab7b466aa71
236+ --- /dev/null
237+ +++ b/gcc/config/devkitpro.opt.urls
238+ @@ -0,0 +1 @@
239+ + ; Autogenerated by regenerate-opt-urls.py from gcc/config/devkitpro.opt and generated HTML
249240diff --git a/gcc/config/i386/host-mingw32.cc b/gcc/config/i386/host-mingw32.cc
250- index acff6138d63..8dc91b75f93 100644
241+ index 42563982e42..923dc198a7e 100644
251242--- a/gcc/config/i386/host-mingw32.cc
252243+++ b/gcc/config/i386/host-mingw32.cc
253244@@ -93,7 +93,10 @@ mingw32_gt_pch_get_address (size_t size, int)
@@ -263,10 +254,10 @@ index acff6138d63..8dc91b75f93 100644
263254 MEM_RESERVE | MEM_TOP_DOWN,
264255 PAGE_NOACCESS);
265256diff --git a/gcc/gcc.cc b/gcc/gcc.cc
266- index 16bb07f2cdc..22a181a3a1c 100644
257+ index 728332b8153..47fc03eb8c8 100644
267258--- a/gcc/gcc.cc
268259+++ b/gcc/gcc.cc
269- @@ -868 ,6 +868 ,11 @@ proper position among the other output files. */
260+ @@ -881 ,6 +881 ,11 @@ proper position among the other output files. */
270261 #endif
271262 #endif
272263
@@ -278,24 +269,37 @@ index 16bb07f2cdc..22a181a3a1c 100644
278269 /* config.h can define STARTFILE_SPEC to override the default crt0 files. */
279270 #ifndef STARTFILE_SPEC
280271 #define STARTFILE_SPEC \
281- @@ -1191 ,6 +1196 ,7 @@ static const char *link_spec = LINK_SPEC;
272+ @@ -1208 ,6 +1213 ,7 @@ static const char *link_spec = LINK_SPEC;
282273 static const char *lib_spec = LIB_SPEC;
283274 static const char *link_gomp_spec = "";
284275 static const char *libgcc_spec = LIBGCC_SPEC;
285276+ static const char *libgloss_spec = LIBGLOSS_SPEC;
286277 static const char *endfile_spec = ENDFILE_SPEC;
287278 static const char *startfile_spec = STARTFILE_SPEC;
288279 static const char *linker_name_spec = LINKER_NAME;
289- @@ -1701 ,6 +1707 ,7 @@ static struct spec_list static_specs[] =
280+ @@ -1720 ,6 +1726 ,7 @@ static struct spec_list static_specs[] =
290281 INIT_STATIC_SPEC ("lib", &lib_spec),
291282 INIT_STATIC_SPEC ("link_gomp", &link_gomp_spec),
292283 INIT_STATIC_SPEC ("libgcc", &libgcc_spec),
293284+ INIT_STATIC_SPEC ("libgloss", &libgloss_spec),
294285 INIT_STATIC_SPEC ("startfile", &startfile_spec),
295286 INIT_STATIC_SPEC ("cross_compile", &cross_compile),
296287 INIT_STATIC_SPEC ("version", &compiler_version),
288+ diff --git a/libcc1/configure b/libcc1/configure
289+ index ea689a353c8..98f9d9b21b7 100755
290+ --- a/libcc1/configure
291+ +++ b/libcc1/configure
292+ @@ -5119,7 +5119,7 @@ else
293+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
294+ # nm: unknown option "B" ignored
295+ case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
296+ - *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
297+ + $tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
298+ break
299+ ;;
300+ *)
297301diff --git a/libgcc/crtstuff.c b/libgcc/crtstuff.c
298- index 93ff5b81dc5..20c0fe89a28 100644
302+ index 38d3859a73c..f97358d9787 100644
299303--- a/libgcc/crtstuff.c
300304+++ b/libgcc/crtstuff.c
301305@@ -326,7 +326,7 @@ register_tm_clones (void)
@@ -308,7 +312,7 @@ index 93ff5b81dc5..20c0fe89a28 100644
308312 in every shared-object; in a main program its value is zero. The
309313 object should in any case be protected. This means the instance
310314diff --git a/libgcc/gthr.h b/libgcc/gthr.h
311- index 1989c0c86ed..f1c49b2d4b1 100644
315+ index 33c2d8ff630..2a0a9c1e87e 100644
312316--- a/libgcc/gthr.h
313317+++ b/libgcc/gthr.h
314318@@ -136,7 +136,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
@@ -321,10 +325,10 @@ index 1989c0c86ed..f1c49b2d4b1 100644
321325 #define GTHREAD_USE_WEAK 0
322326 #endif
323327diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
324- index a880e8ee227..c58249f986c 100644
328+ index 422a0f4bd0a..ee09ada9170 100644
325329--- a/libstdc++-v3/include/Makefile.am
326330+++ b/libstdc++-v3/include/Makefile.am
327- @@ -1417 ,6 +1417 ,7 @@ ${host_builddir}/gthr.h: ${toplevel_srcdir}/libgcc/gthr.h stamp-${host_alias}
331+ @@ -1429 ,6 +1429 ,7 @@ ${host_builddir}/gthr.h: ${toplevel_srcdir}/libgcc/gthr.h stamp-${host_alias}
328332 -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCXX_\1/g' \
329333 -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \
330334 -e 's/_GLIBCXX___MINGW32_GLIBCXX___/__MINGW32__/g' \
@@ -333,14 +337,27 @@ index a880e8ee227..c58249f986c 100644
333337 < $< > $@
334338
335339diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
336- index 0ff875b280b..37820c57a0a 100644
340+ index 9fd4ab4848c..beea48941a3 100644
337341--- a/libstdc++-v3/include/Makefile.in
338342+++ b/libstdc++-v3/include/Makefile.in
339- @@ -1891 ,6 +1891 ,7 @@ ${host_builddir}/gthr.h: ${toplevel_srcdir}/libgcc/gthr.h stamp-${host_alias}
343+ @@ -1903 ,6 +1903 ,7 @@ ${host_builddir}/gthr.h: ${toplevel_srcdir}/libgcc/gthr.h stamp-${host_alias}
340344 -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCXX_\1/g' \
341345 -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \
342346 -e 's/_GLIBCXX___MINGW32_GLIBCXX___/__MINGW32__/g' \
343347+ -e 's/_GLIBCXX___DEVKITA64_GLIBCXX___/__DEVKITA64__/g' \
344348 -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
345349 < $< > $@
346350
351+ diff --git a/lto-plugin/configure b/lto-plugin/configure
352+ index 28f5dd79cd7..a79f318a4d6 100755
353+ --- a/lto-plugin/configure
354+ +++ b/lto-plugin/configure
355+ @@ -6469,7 +6469,7 @@ else
356+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
357+ # nm: unknown option "B" ignored
358+ case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
359+ - *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
360+ + $tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
361+ break
362+ ;;
363+ *)
0 commit comments