Skip to content

Commit 03bc549

Browse files
committed
devkitARM: gcc 14.1 release candidate
1 parent 5ae950a commit 03bc549

File tree

4 files changed

+357
-3
lines changed

4 files changed

+357
-3
lines changed

build-devkit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
#---------------------------------------------------------------------------------
3-
# devkitARM release 63
3+
# devkitARM release 64
44
# devkitPPC release 45.2
55
# devkitA64 release 25.1
66
#---------------------------------------------------------------------------------
Lines changed: 354 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,354 @@
1+
diff --git a/gcc/config.gcc b/gcc/config.gcc
2+
index 6fd1594480a..92b82426f50 100644
3+
--- a/gcc/config.gcc
4+
+++ b/gcc/config.gcc
5+
@@ -1412,6 +1412,11 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems* | arm*-*-fuchsia*)
6+
tm_file="$tm_file newlib-stdint.h"
7+
tmake_file="${tmake_file} arm/t-bpabi"
8+
use_gcc_stdint=wrap
9+
+ tm_file="${tm_file} devkitpro.h"
10+
+ extra_options="${extra_options} devkitpro.opt"
11+
+ case ${enable_threads} in
12+
+ "" | yes | posix) thread_file='posix' ;;
13+
+ esac
14+
;;
15+
arm*-*-fuchsia*)
16+
tm_file="${tm_file} fuchsia.h arm/fuchsia-elf.h glibc-stdint.h"
17+
diff --git a/gcc/config/arm/arm-cpus.in b/gcc/config/arm/arm-cpus.in
18+
index f1fa3fa174c..2bb894b5b2d 100644
19+
--- a/gcc/config/arm/arm-cpus.in
20+
+++ b/gcc/config/arm/arm-cpus.in
21+
@@ -416,7 +416,7 @@ begin arch armv6k
22+
tune for mpcore
23+
tune flags CO_PROC
24+
base 6K
25+
- isa ARMv6k
26+
+ isa ARMv6k VFPv2 FP_DBL
27+
option fp add VFPv2 FP_DBL
28+
optalias vfpv2 fp
29+
option nofp remove ALL_FP
30+
diff --git a/gcc/config/arm/t-arm-elf b/gcc/config/arm/t-arm-elf
31+
index f7fc1460d1c..055f9d62385 100644
32+
--- a/gcc/config/arm/t-arm-elf
33+
+++ b/gcc/config/arm/t-arm-elf
34+
@@ -16,120 +16,22 @@
35+
# along with GCC; see the file COPYING3. If not see
36+
# <http://www.gnu.org/licenses/>.
37+
38+
-# Build a very basic set of libraries that should cater for most cases.
39+
-
40+
-# Single-precision floating-point is NOT supported; we don't build a
41+
-# suitable library for that. Use the rm-profile config in that case.
42+
-
43+
-# PART 1 - Useful groups of options
44+
-
45+
-dp_fpus := vfp vfpv2 vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16 \
46+
- neon neon-vfpv3 neon-fp16 vfpv4 neon-vfpv4 vfpv4-d16 \
47+
- fpv5-d16 fp-armv8 neon-fp-armv8 crypto-neon-fp-armv8 \
48+
- vfp3
49+
-
50+
-sp_fpus := vfpv3xd vfpv3xd-fp16 fpv4-sp-d16 fpv5-sp-d16
51+
-
52+
-v7a_fps := vfpv3 vfpv3-fp16 vfpv4 simd neon-fp16 neon-vfpv4
53+
-v7ve_fps := vfpv3-d16 vfpv3 vfpv3-d16-fp16 vfpv3-fp16 vfpv4 neon \
54+
- neon-fp16 simd
55+
-
56+
-# Not all these permutations exist for all architecture variants, but
57+
-# it seems to work ok.
58+
-v8_fps := simd fp16 crypto fp16+crypto dotprod fp16fml
59+
-
60+
-v9_fps := simd fp16 crypto fp16+crypto dotprod fp16fml
61+
-
62+
-# We don't do anything special with these. Pre-v4t probably doesn't work.
63+
-all_early_nofp := armv4 armv4t armv5t
64+
-
65+
-all_early_arch := armv5tej armv6 armv6j armv6k armv6z armv6kz \
66+
- armv6zk armv6t2 iwmmxt iwmmxt2
67+
-
68+
-all_v7_a_r := armv7-a armv7ve armv7-r
69+
-
70+
-all_v8_archs := armv8-a armv8-a+crc armv8.1-a armv8.2-a armv8.3-a armv8.4-a \
71+
- armv8.5-a armv8.6-a
72+
-
73+
-all_v9_archs := armv9-a
74+
-
75+
-# No floating point variants, require thumb1 softfp
76+
-all_nofp_t := armv6-m armv6s-m armv8-m.base
77+
-
78+
-all_nofp_t2 := armv7-m
79+
-
80+
-all_sp_only := armv7e-m armv8-m.main
81+
-
82+
-MULTILIB_OPTIONS =
83+
-MULTILIB_DIRNAMES =
84+
+MULTILIB_OPTIONS = mthumb mbig-endian march=armv6k march=armv6s-m mfloat-abi=hard mfloat-abi=soft
85+
+MULTILIB_DIRNAMES = thumb be armv6k v6-m fpu nofp
86+
MULTILIB_EXCEPTIONS =
87+
MULTILIB_MATCHES =
88+
-MULTILIB_REUSE =
89+
-
90+
-# PART 2 - multilib build rules
91+
-
92+
-MULTILIB_OPTIONS += marm/mthumb
93+
-MULTILIB_DIRNAMES += arm thumb
94+
-
95+
-MULTILIB_OPTIONS += mfpu=auto
96+
-MULTILIB_DIRNAMES += autofp
97+
-
98+
-MULTILIB_OPTIONS += march=armv5te+fp/march=armv7+fp
99+
-MULTILIB_DIRNAMES += v5te v7
100+
-
101+
-MULTILIB_OPTIONS += mfloat-abi=hard
102+
-MULTILIB_DIRNAMES += fpu
103+
-
104+
-# Build a total of 4 library variants (base options plus the following):
105+
-MULTILIB_REQUIRED += mthumb
106+
-MULTILIB_REQUIRED += marm/mfpu=auto/march=armv5te+fp/mfloat-abi=hard
107+
-MULTILIB_REQUIRED += mthumb/mfpu=auto/march=armv7+fp/mfloat-abi=hard
108+
-
109+
-# PART 3 - Match rules
110+
-
111+
-# Map all supported FPUs onto mfpu=auto
112+
-MULTILIB_MATCHES += $(foreach FPU, $(dp_fpus), \
113+
- mfpu?auto=mfpu?$(FPU))
114+
-
115+
-MULTILIB_MATCHES += march?armv5te+fp=march?armv5te
116+
-
117+
-MULTILIB_MATCHES += $(foreach ARCH, $(all_early_arch), \
118+
- march?armv5te+fp=march?$(ARCH) \
119+
- march?armv5te+fp=march?$(ARCH)+fp)
120+
-
121+
-MULTILIB_MATCHES += march?armv7+fp=march?armv7
122+
-
123+
-MULTILIB_MATCHES += $(foreach FPARCH, $(v7a_fps), \
124+
- march?armv7+fp=march?armv7-a+$(FPARCH))
125+
-
126+
-MULTILIB_MATCHES += $(foreach FPARCH, $(v7ve_fps), \
127+
- march?armv7+fp=march?armv7ve+$(FPARCH))
128+
-
129+
-MULTILIB_MATCHES += $(foreach ARCH, $(all_v7_a_r), \
130+
- march?armv7+fp=march?$(ARCH) \
131+
- march?armv7+fp=march?$(ARCH)+fp)
132+
133+
-MULTILIB_MATCHES += $(foreach ARCH, $(all_v8_archs), \
134+
- march?armv7+fp=march?$(ARCH) \
135+
- $(foreach FPARCH, $(v8_fps), \
136+
- march?armv7+fp=march?$(ARCH)+$(FPARCH)))
137+
+MULTILIB_REQUIRED = mthumb mbig-endian mthumb/mbig-endian march=armv6k/mfloat-abi=hard mthumb/march=armv6s-m/mfloat-abi=soft
138+
139+
-MULTILIB_MATCHES += $(foreach ARCH, $(all_v9_archs), \
140+
- march?armv7+fp=march?$(ARCH) \
141+
- $(foreach FPARCH, $(v9_fps), \
142+
- march?armv7+fp=march?$(ARCH)+$(FPARCH)))
143+
144+
-MULTILIB_MATCHES += $(foreach ARCH, armv7e-m armv8-m.mainline, \
145+
- march?armv7+fp=march?$(ARCH)+fp.dp)
146+
+MULTILIB_MATCHES += march?armv6k=mtune?mpcore
147+
+MULTILIB_MATCHES += march?armv6k=mcpu?mpcore
148+
149+
-# PART 4 - Reuse rules
150+
+MULTILIB_MATCHES += march?armv6s-m=mcpu?cortex-m0
151+
+MULTILIB_MATCHES += march?armv6s-m=mtune?cortex-m0
152+
+MULTILIB_MATCHES += march?armv6s-m=mcpu?cortex-m0plus
153+
+MULTILIB_MATCHES += march?armv6s-m=mtune?cortex-m0plus
154+
+MULTILIB_MATCHES += march?armv6s-m=mcpu?cortex-m1
155+
+MULTILIB_MATCHES += march?armv6s-m=mtune?cortex-m1
156+
157+
-MULTILIB_REUSE += mthumb=mthumb/mfpu.auto
158+
-MULTILIB_REUSE += mthumb=mthumb/mfpu.auto/march.armv5te+fp
159+
-MULTILIB_REUSE += mthumb=mthumb/march.armv5te+fp
160+
-MULTILIB_REUSE += marm/mfpu.auto/march.armv5te+fp/mfloat-abi.hard=marm/march.armv5te+fp/mfloat-abi.hard
161+
-MULTILIB_REUSE += marm/mfpu.auto/march.armv5te+fp/mfloat-abi.hard=march.armv5te+fp/mfloat-abi.hard
162+
-MULTILIB_REUSE += marm/mfpu.auto/march.armv5te+fp/mfloat-abi.hard=mfpu.auto/march.armv5te+fp/mfloat-abi.hard
163+
-MULTILIB_REUSE += mthumb/mfpu.auto/march.armv7+fp/mfloat-abi.hard=mthumb/march.armv7+fp/mfloat-abi.hard
164+
-MULTILIB_REUSE += mthumb/mfpu.auto/march.armv7+fp/mfloat-abi.hard=mfpu.auto/march.armv7+fp/mfloat-abi.hard
165+
-MULTILIB_REUSE += mthumb/mfpu.auto/march.armv7+fp/mfloat-abi.hard=march.armv7+fp/mfloat-abi.hard
166+
+MULTILIB_REUSE = mthumb/march.armv6s-m/mfloat-abi.soft=mthumb/march.armv6s-m
167+
diff --git a/gcc/config/arm/unknown-elf.h b/gcc/config/arm/unknown-elf.h
168+
index 397ac3f68b9..b9a388f19be 100644
169+
--- a/gcc/config/arm/unknown-elf.h
170+
+++ b/gcc/config/arm/unknown-elf.h
171+
@@ -29,7 +29,7 @@
172+
#endif
173+
174+
/* Now we define the strings used to build the spec file. */
175+
-#define UNKNOWN_ELF_STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
176+
+#define UNKNOWN_ELF_STARTFILE_SPEC " crti%O%s crtbegin%O%s"
177+
178+
#undef STARTFILE_SPEC
179+
#define STARTFILE_SPEC \
180+
@@ -93,4 +93,5 @@
181+
udivmoddi4, which will depend on the exception unwind routines,
182+
which will depend on abort, which is defined in libc. */
183+
#undef LINK_GCC_C_SEQUENCE_SPEC
184+
-#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %{!nolibc:%L} --end-group"
185+
+#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L %(libgloss) --end-group"
186+
+
187+
diff --git a/gcc/config/devkitpro.h b/gcc/config/devkitpro.h
188+
new file mode 100644
189+
index 00000000000..180a9ea8553
190+
--- /dev/null
191+
+++ b/gcc/config/devkitpro.h
192+
@@ -0,0 +1,27 @@
193+
+/* Definitions for devkitPro toolchains.
194+
+ Copyright (C) 2016-2018 Free Software Foundation, Inc.
195+
+ This file is part of GCC.
196+
+ GCC is free software; you can redistribute it and/or modify it
197+
+ under the terms of the GNU General Public License as published
198+
+ by the Free Software Foundation; either version 3, or (at your
199+
+ option) any later version.
200+
+ GCC is distributed in the hope that it will be useful, but WITHOUT
201+
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
202+
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
203+
+ License for more details.
204+
+ Under Section 7 of GPL version 3, you are granted additional
205+
+ permissions described in the GCC Runtime Library Exception, version
206+
+ 3.1, as published by the Free Software Foundation.
207+
+ You should have received a copy of the GNU General Public License and
208+
+ a copy of the GCC Runtime Library Exception along with this program;
209+
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
210+
+ <http://www.gnu.org/licenses/>. */
211+
+
212+
+#undef TARGET_OS_CPP_BUILTINS
213+
+#define TARGET_OS_CPP_BUILTINS() \
214+
+ do { \
215+
+ builtin_define ("__DEVKITPRO__"); \
216+
+ builtin_define ("__DEVKITARM__"); \
217+
+ } while (0)
218+
+
219+
+
220+
diff --git a/gcc/config/devkitpro.opt b/gcc/config/devkitpro.opt
221+
new file mode 100644
222+
index 00000000000..9acbbf9d27c
223+
--- /dev/null
224+
+++ b/gcc/config/devkitpro.opt
225+
@@ -0,0 +1,29 @@
226+
+; Options for devkitPro toolchains.
227+
+
228+
+; Copyright (C) 2011-2018 Free Software Foundation, Inc.
229+
+;
230+
+; This file is part of GCC.
231+
+;
232+
+; GCC is free software; you can redistribute it and/or modify it under
233+
+; the terms of the GNU General Public License as published by the Free
234+
+; Software Foundation; either version 3, or (at your option) any later
235+
+; version.
236+
+;
237+
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
238+
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
239+
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
240+
+; for more details.
241+
+;
242+
+; You should have received a copy of the GNU General Public License
243+
+; along with GCC; see the file COPYING3. If not see
244+
+; <http://www.gnu.org/licenses/>.
245+
+
246+
+; See the GCC internals manual (options.texi) for a description of
247+
+; this file's format.
248+
+
249+
+; Please try to keep this file in ASCII collating order.
250+
+
251+
+pthread
252+
+Driver
253+
+
254+
+; This comment is to ensure we retain the blank line above.
255+
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
256+
index 16bb07f2cdc..22a181a3a1c 100644
257+
--- a/gcc/gcc.cc
258+
+++ b/gcc/gcc.cc
259+
@@ -868,6 +868,11 @@ proper position among the other output files. */
260+
#endif
261+
#endif
262+
263+
+#ifndef LIBGLOSS_SPEC
264+
+# define LIBGLOSS_SPEC "-lsysbase"
265+
+#endif
266+
+
267+
+
268+
/* config.h can define STARTFILE_SPEC to override the default crt0 files. */
269+
#ifndef STARTFILE_SPEC
270+
#define STARTFILE_SPEC \
271+
@@ -1191,6 +1196,7 @@ static const char *link_spec = LINK_SPEC;
272+
static const char *lib_spec = LIB_SPEC;
273+
static const char *link_gomp_spec = "";
274+
static const char *libgcc_spec = LIBGCC_SPEC;
275+
+static const char *libgloss_spec = LIBGLOSS_SPEC;
276+
static const char *endfile_spec = ENDFILE_SPEC;
277+
static const char *startfile_spec = STARTFILE_SPEC;
278+
static const char *linker_name_spec = LINKER_NAME;
279+
@@ -1701,6 +1707,7 @@ static struct spec_list static_specs[] =
280+
INIT_STATIC_SPEC ("lib", &lib_spec),
281+
INIT_STATIC_SPEC ("link_gomp", &link_gomp_spec),
282+
INIT_STATIC_SPEC ("libgcc", &libgcc_spec),
283+
+ INIT_STATIC_SPEC ("libgloss", &libgloss_spec),
284+
INIT_STATIC_SPEC ("startfile", &startfile_spec),
285+
INIT_STATIC_SPEC ("cross_compile", &cross_compile),
286+
INIT_STATIC_SPEC ("version", &compiler_version),
287+
diff --git a/libgcc/config/arm/t-bpabi b/libgcc/config/arm/t-bpabi
288+
index dddddc7c444..c2502597953 100644
289+
--- a/libgcc/config/arm/t-bpabi
290+
+++ b/libgcc/config/arm/t-bpabi
291+
@@ -17,4 +17,4 @@ SHLIB_MAPFILES += $(srcdir)/config/arm/libgcc-bpabi.ver
292+
# On ARM, specifying -fnon-call-exceptions will needlessly pull in
293+
# the unwinder in simple programs which use 64-bit division. Omitting
294+
# the option is safe.
295+
-LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions
296+
+LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions
297+
diff --git a/libgcc/crtstuff.c b/libgcc/crtstuff.c
298+
index 93ff5b81dc5..20c0fe89a28 100644
299+
--- a/libgcc/crtstuff.c
300+
+++ b/libgcc/crtstuff.c
301+
@@ -326,7 +326,7 @@ register_tm_clones (void)
302+
303+
#ifdef OBJECT_FORMAT_ELF
304+
305+
-#if DEFAULT_USE_CXA_ATEXIT
306+
+#if 1 /* DEFAULT_USE_CXA_ATEXIT */
307+
/* Declare the __dso_handle variable. It should have a unique value
308+
in every shared-object; in a main program its value is zero. The
309+
object should in any case be protected. This means the instance
310+
diff --git a/libgcc/gthr.h b/libgcc/gthr.h
311+
index 1989c0c86ed..dc3220cdf3c 100644
312+
--- a/libgcc/gthr.h
313+
+++ b/libgcc/gthr.h
314+
@@ -136,7 +136,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
315+
/* The pe-coff weak support isn't fully compatible to ELF's weak.
316+
For static libraries it might would work, but as we need to deal
317+
with shared versions too, we disable it for mingw-targets. */
318+
-#ifdef __MINGW32__
319+
+#ifdef __MINGW32__ || defined(__DEVKITARM__)
320+
#undef GTHREAD_USE_WEAK
321+
#define GTHREAD_USE_WEAK 0
322+
#endif
323+
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
324+
index a880e8ee227..2050e2e4ccf 100644
325+
--- a/libstdc++-v3/include/Makefile.am
326+
+++ b/libstdc++-v3/include/Makefile.am
327+
@@ -1417,6 +1417,7 @@ ${host_builddir}/gthr.h: ${toplevel_srcdir}/libgcc/gthr.h stamp-${host_alias}
328+
-e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCXX_\1/g' \
329+
-e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \
330+
-e 's/_GLIBCXX___MINGW32_GLIBCXX___/__MINGW32__/g' \
331+
+ -e 's/_GLIBCXX___DEVKITARM_GLIBCXX___/__DEVKITARM__/g' \
332+
-e 's,^#include "\(.*\)",#include <bits/\1>,g' \
333+
< $< > $@
334+
335+
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
336+
index 0ff875b280b..7d270fc3a83 100644
337+
--- a/libstdc++-v3/include/Makefile.in
338+
+++ b/libstdc++-v3/include/Makefile.in
339+
@@ -336,6 +336,7 @@ prefix = @prefix@
340+
program_transform_name = @program_transform_name@
341+
psdir = @psdir@
342+
python_mod_dir = @python_mod_dir@
343+
+runstatedir = @runstatedir@
344+
sbindir = @sbindir@
345+
sharedstatedir = @sharedstatedir@
346+
srcdir = @srcdir@
347+
@@ -1891,6 +1892,7 @@ ${host_builddir}/gthr.h: ${toplevel_srcdir}/libgcc/gthr.h stamp-${host_alias}
348+
-e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCXX_\1/g' \
349+
-e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \
350+
-e 's/_GLIBCXX___MINGW32_GLIBCXX___/__MINGW32__/g' \
351+
+ -e 's/_GLIBCXX___DEVKITARM_GLIBCXX___/__DEVKITARM__/g' \
352+
-e 's,^#include "\(.*\)",#include <bits/\1>,g' \
353+
< $< > $@
354+

dkarm-eabi/scripts/build-gcc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ then
6666
--with-system-zlib \
6767
--disable-tm-clone-registry \
6868
--disable-__cxa_atexit \
69-
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitARM release 63" \
69+
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitARM release 64" \
7070
$CROSS_PARAMS \
7171
$CROSS_GCC_PARAMS \
7272
$EXTRA_GCC_PARAMS \

select_toolchain.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ done
3030

3131
case "$VERSION" in
3232
"1" )
33-
GCC_VER=13.2.0
33+
GCC_VER=14.1.0-RC-20240430
3434
BINUTILS_VER=2.41
3535
NEWLIB_VER=4.4.0.20231231
3636
basedir='dkarm-eabi'

0 commit comments

Comments
 (0)