diff options
Diffstat (limited to 'tools/toolchain-patches')
-rw-r--r-- | tools/toolchain-patches/glibc-225-make44.patch (renamed from tools/toolchain-patches/glibc-227-make44.patch) | 102 | ||||
-rw-r--r-- | tools/toolchain-patches/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-4.9.4.diff | 56 | ||||
-rw-r--r-- | tools/toolchain-patches/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-8.5.0.diff | 77 |
3 files changed, 113 insertions, 122 deletions
diff --git a/tools/toolchain-patches/glibc-227-make44.patch b/tools/toolchain-patches/glibc-225-make44.patch index 3de5cb0fdd..45d4e9c621 100644 --- a/tools/toolchain-patches/glibc-227-make44.patch +++ b/tools/toolchain-patches/glibc-225-make44.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | diff -Naur glibc-2.27/libio/stdio.h glibc-2.27-patched/libio/stdio.h | 1 | diff -Naur glibc-2.25/libio/stdio.h glibc-2.25-patched/libio/stdio.h |
2 | --- glibc-2.27/libio/stdio.h 2018-02-01 11:17:18.000000000 -0500 | 2 | --- glibc-2.25/libio/stdio.h 2017-02-05 10:28:43.000000000 -0500 |
3 | +++ glibc-2.27-patched/libio/stdio.h 2023-05-23 14:10:06.618633203 -0400 | 3 | +++ glibc-2.25-patched/libio/stdio.h 2023-05-23 15:22:27.482980335 -0400 |
4 | @@ -118,18 +118,23 @@ | 4 | @@ -154,18 +154,23 @@ |
5 | # define P_tmpdir "/tmp" | 5 | # define P_tmpdir "/tmp" |
6 | #endif | 6 | #endif |
7 | 7 | ||
@@ -32,19 +32,20 @@ diff -Naur glibc-2.27/libio/stdio.h glibc-2.27-patched/libio/stdio.h | |||
32 | 32 | ||
33 | /* Standard streams. */ | 33 | /* Standard streams. */ |
34 | extern struct _IO_FILE *stdin; /* Standard input stream. */ | 34 | extern struct _IO_FILE *stdin; /* Standard input stream. */ |
35 | diff -Naur glibc-2.27/Makerules glibc-2.27-patched/Makerules | 35 | diff -Naur glibc-2.25/Makerules glibc-2.25-patched/Makerules |
36 | --- glibc-2.27/Makerules 2018-02-01 11:17:18.000000000 -0500 | 36 | --- glibc-2.25/Makerules 2017-02-05 10:28:43.000000000 -0500 |
37 | +++ glibc-2.27-patched/Makerules 2023-05-23 14:10:06.617633203 -0400 | 37 | +++ glibc-2.25-patched/Makerules 2023-05-23 15:22:05.594967548 -0400 |
38 | @@ -1522,46 +1522,6 @@ | 38 | @@ -1474,55 +1474,7 @@ |
39 | endif | ||
39 | 40 | ||
40 | endif | 41 | endif |
41 | 42 | - | |
42 | -# These will have been set by sysdeps/posix/Makefile. | 43 | -# These will have been set by sysdeps/posix/Makefile. |
43 | -L_tmpnam ?= 1 | 44 | -L_tmpnam ?= 1 |
44 | -TMP_MAX ?= 0 | 45 | -TMP_MAX ?= 0 |
45 | -L_ctermid ?= 1 | 46 | -L_ctermid ?= 1 |
46 | -L_cuserid ?= 1 | 47 | -L_cuserid ?= 1 |
47 | - | 48 | |
48 | -stdio_lim = $(common-objpfx)bits/stdio_lim.h | 49 | -stdio_lim = $(common-objpfx)bits/stdio_lim.h |
49 | - | 50 | - |
50 | -$(stdio_lim:lim.h=%.h) $(stdio_lim:lim.h=%.d): $(stdio_lim:lim.h=%.st); @: | 51 | -$(stdio_lim:lim.h=%.h) $(stdio_lim:lim.h=%.d): $(stdio_lim:lim.h=%.st); @: |
@@ -52,7 +53,8 @@ diff -Naur glibc-2.27/Makerules glibc-2.27-patched/Makerules | |||
52 | - $(common-objpfx)config.make | 53 | - $(common-objpfx)config.make |
53 | - $(make-target-directory) | 54 | - $(make-target-directory) |
54 | - { echo '#include "$(..)posix/bits/posix1_lim.h"'; \ | 55 | - { echo '#include "$(..)posix/bits/posix1_lim.h"'; \ |
55 | - } | \ | 56 | - echo '#define _LIBC 1'; \ |
57 | - echo '#include "$(..)misc/sys/uio.h"'; } | \ | ||
56 | - $(CC) -E -dM -MD -MP -MF $(@:st=dT) -MT '$(@:st=h) $(@:st=d)' \ | 58 | - $(CC) -E -dM -MD -MP -MF $(@:st=dT) -MT '$(@:st=h) $(@:st=d)' \ |
57 | - $(CPPUNDEFS) $(+includes) -xc - -o $(@:st=hT) | 59 | - $(CPPUNDEFS) $(+includes) -xc - -o $(@:st=hT) |
58 | - sed $(sed-remove-objpfx) $(sed-remove-dotdot) \ | 60 | - sed $(sed-remove-objpfx) $(sed-remove-dotdot) \ |
@@ -60,14 +62,21 @@ diff -Naur glibc-2.27/Makerules glibc-2.27-patched/Makerules | |||
60 | - mv -f $(@:st=dt) $(@:st=d) | 62 | - mv -f $(@:st=dt) $(@:st=d) |
61 | - fopen_max=`sed -n 's/^#define OPEN_MAX //1p' $(@:st=hT)`; \ | 63 | - fopen_max=`sed -n 's/^#define OPEN_MAX //1p' $(@:st=hT)`; \ |
62 | - filename_max=`sed -n 's/^#define PATH_MAX //1p' $(@:st=hT)`; \ | 64 | - filename_max=`sed -n 's/^#define PATH_MAX //1p' $(@:st=hT)`; \ |
65 | - iov_max=`sed -n 's/^#define UIO_MAXIOV //p' $(@:st=hT)`; \ | ||
63 | - fopen_max=$${fopen_max:-16}; \ | 66 | - fopen_max=$${fopen_max:-16}; \ |
64 | - filename_max=$${filename_max:-1024}; \ | 67 | - filename_max=$${filename_max:-1024}; \ |
68 | - if [ -z "$$iov_max" ]; then \ | ||
69 | - define_iov_max="# undef IOV_MAX"; \ | ||
70 | - else \ | ||
71 | - define_iov_max="# define IOV_MAX $$iov_max"; \ | ||
72 | - fi; \ | ||
65 | - sed -e "s/@FOPEN_MAX@/$$fopen_max/" \ | 73 | - sed -e "s/@FOPEN_MAX@/$$fopen_max/" \ |
66 | - -e "s/@FILENAME_MAX@/$$filename_max/" \ | 74 | - -e "s/@FILENAME_MAX@/$$filename_max/" \ |
67 | - -e "s/@L_tmpnam@/$(L_tmpnam)/" \ | 75 | - -e "s/@L_tmpnam@/$(L_tmpnam)/" \ |
68 | - -e "s/@TMP_MAX@/$(TMP_MAX)/" \ | 76 | - -e "s/@TMP_MAX@/$(TMP_MAX)/" \ |
69 | - -e "s/@L_ctermid@/$(L_ctermid)/" \ | 77 | - -e "s/@L_ctermid@/$(L_ctermid)/" \ |
70 | - -e "s/@L_cuserid@/$(L_cuserid)/" \ | 78 | - -e "s/@L_cuserid@/$(L_cuserid)/" \ |
79 | - -e "s/@define_IOV_MAX@/$$define_iov_max/" \ | ||
71 | - $< > $(@:st=h.new) | 80 | - $< > $(@:st=h.new) |
72 | - $(move-if-change) $(@:st=h.new) $(@:st=h) | 81 | - $(move-if-change) $(@:st=h.new) $(@:st=h) |
73 | -# Remove these last so that they can be examined if something went wrong. | 82 | -# Remove these last so that they can be examined if something went wrong. |
@@ -82,9 +91,9 @@ diff -Naur glibc-2.27/Makerules glibc-2.27-patched/Makerules | |||
82 | FORCE: | 91 | FORCE: |
83 | 92 | ||
84 | .PHONY: echo-headers | 93 | .PHONY: echo-headers |
85 | diff -Naur glibc-2.27/Rules glibc-2.27-patched/Rules | 94 | diff -Naur glibc-2.25/Rules glibc-2.25-patched/Rules |
86 | --- glibc-2.27/Rules 2018-02-01 11:17:18.000000000 -0500 | 95 | --- glibc-2.25/Rules 2017-02-05 10:28:43.000000000 -0500 |
87 | +++ glibc-2.27-patched/Rules 2023-05-23 14:10:06.617633203 -0400 | 96 | +++ glibc-2.25-patched/Rules 2023-05-23 15:22:27.482980335 -0400 |
88 | @@ -60,9 +60,6 @@ | 97 | @@ -60,9 +60,6 @@ |
89 | common-generated := | 98 | common-generated := |
90 | endif | 99 | endif |
@@ -95,11 +104,11 @@ diff -Naur glibc-2.27/Rules glibc-2.27-patched/Rules | |||
95 | include $(..)Makerules | 104 | include $(..)Makerules |
96 | 105 | ||
97 | .PHONY: subdir_lib | 106 | .PHONY: subdir_lib |
98 | diff -Naur glibc-2.27/stdio-common/stdio_lim.h.in glibc-2.27-patched/stdio-common/stdio_lim.h.in | 107 | diff -Naur glibc-2.25/stdio-common/stdio_lim.h.in glibc-2.25-patched/stdio-common/stdio_lim.h.in |
99 | --- glibc-2.27/stdio-common/stdio_lim.h.in 2018-02-01 11:17:18.000000000 -0500 | 108 | --- glibc-2.25/stdio-common/stdio_lim.h.in 2017-02-05 10:28:43.000000000 -0500 |
100 | +++ glibc-2.27-patched/stdio-common/stdio_lim.h.in 1969-12-31 19:00:00.000000000 -0500 | 109 | +++ glibc-2.25-patched/stdio-common/stdio_lim.h.in 1969-12-31 19:00:00.000000000 -0500 |
101 | @@ -1,39 +0,0 @@ | 110 | @@ -1,42 +0,0 @@ |
102 | -/* Copyright (C) 1994-2018 Free Software Foundation, Inc. | 111 | -/* Copyright (C) 1994-2017 Free Software Foundation, Inc. |
103 | - This file is part of the GNU C Library. | 112 | - This file is part of the GNU C Library. |
104 | - | 113 | - |
105 | - The GNU C Library is free software; you can redistribute it and/or | 114 | - The GNU C Library is free software; you can redistribute it and/or |
@@ -116,31 +125,34 @@ diff -Naur glibc-2.27/stdio-common/stdio_lim.h.in glibc-2.27-patched/stdio-commo | |||
116 | - License along with the GNU C Library; if not, see | 125 | - License along with the GNU C Library; if not, see |
117 | - <http://www.gnu.org/licenses/>. */ | 126 | - <http://www.gnu.org/licenses/>. */ |
118 | - | 127 | - |
119 | -#ifndef _BITS_STDIO_LIM_H | 128 | -#if !defined _STDIO_H && !defined __need_FOPEN_MAX && !defined __need_IOV_MAX |
120 | -#define _BITS_STDIO_LIM_H 1 | ||
121 | - | ||
122 | -#ifndef _STDIO_H | ||
123 | -# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." | 129 | -# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." |
124 | -#endif | 130 | -#endif |
125 | - | 131 | - |
126 | -#define L_tmpnam @L_tmpnam@ | 132 | -#ifdef _STDIO_H |
127 | -#define TMP_MAX @TMP_MAX@ | 133 | -# define L_tmpnam @L_tmpnam@ |
128 | -#define FILENAME_MAX @FILENAME_MAX@ | 134 | -# define TMP_MAX @TMP_MAX@ |
135 | -# define FILENAME_MAX @FILENAME_MAX@ | ||
129 | - | 136 | - |
130 | -#ifdef __USE_POSIX | 137 | -# ifdef __USE_POSIX |
131 | -# define L_ctermid @L_ctermid@ | 138 | -# define L_ctermid @L_ctermid@ |
132 | -# if !defined __USE_XOPEN2K || defined __USE_GNU | 139 | -# if !defined __USE_XOPEN2K || defined __USE_GNU |
133 | -# define L_cuserid @L_cuserid@ | 140 | -# define L_cuserid @L_cuserid@ |
141 | -# endif | ||
134 | -# endif | 142 | -# endif |
135 | -#endif | 143 | -#endif |
136 | - | 144 | - |
137 | -#undef FOPEN_MAX | 145 | -#if defined __need_FOPEN_MAX || defined _STDIO_H |
138 | -#define FOPEN_MAX @FOPEN_MAX@ | 146 | -# undef FOPEN_MAX |
147 | -# define FOPEN_MAX @FOPEN_MAX@ | ||
148 | -#endif | ||
139 | - | 149 | - |
140 | -#endif /* bits/stdio_lim.h */ | 150 | -#if defined __need_IOV_MAX && !defined IOV_MAX |
141 | diff -Naur glibc-2.27/sysdeps/mach/hurd/bits/stdio_lim.h glibc-2.27-patched/sysdeps/mach/hurd/bits/stdio_lim.h | 151 | -@define_IOV_MAX@ |
142 | --- glibc-2.27/sysdeps/mach/hurd/bits/stdio_lim.h 1969-12-31 19:00:00.000000000 -0500 | 152 | -#endif |
143 | +++ glibc-2.27-patched/sysdeps/mach/hurd/bits/stdio_lim.h 2023-05-23 14:10:06.618633203 -0400 | 153 | diff -Naur glibc-2.25/sysdeps/mach/hurd/bits/stdio_lim.h glibc-2.25-patched/sysdeps/mach/hurd/bits/stdio_lim.h |
154 | --- glibc-2.25/sysdeps/mach/hurd/bits/stdio_lim.h 1969-12-31 19:00:00.000000000 -0500 | ||
155 | +++ glibc-2.25-patched/sysdeps/mach/hurd/bits/stdio_lim.h 2023-05-23 15:22:27.483980336 -0400 | ||
144 | @@ -0,0 +1,28 @@ | 156 | @@ -0,0 +1,28 @@ |
145 | +/* System specific stdio.h definitions. Hurd version. | 157 | +/* System specific stdio.h definitions. Hurd version. |
146 | + Copyright (C) 2023 Free Software Foundation, Inc. | 158 | + Copyright (C) 2023 Free Software Foundation, Inc. |
@@ -170,9 +182,9 @@ diff -Naur glibc-2.27/sysdeps/mach/hurd/bits/stdio_lim.h glibc-2.27-patched/sysd | |||
170 | +#define FILENAME_MAX 1024 | 182 | +#define FILENAME_MAX 1024 |
171 | + | 183 | + |
172 | +#endif /* bits/stdio_lim.h */ | 184 | +#endif /* bits/stdio_lim.h */ |
173 | diff -Naur glibc-2.27/sysdeps/posix/Makefile glibc-2.27-patched/sysdeps/posix/Makefile | 185 | diff -Naur glibc-2.25/sysdeps/posix/Makefile glibc-2.25-patched/sysdeps/posix/Makefile |
174 | --- glibc-2.27/sysdeps/posix/Makefile 2018-02-01 11:17:18.000000000 -0500 | 186 | --- glibc-2.25/sysdeps/posix/Makefile 2017-02-05 10:28:43.000000000 -0500 |
175 | +++ glibc-2.27-patched/sysdeps/posix/Makefile 2023-05-23 14:10:06.618633203 -0400 | 187 | +++ glibc-2.25-patched/sysdeps/posix/Makefile 2023-05-23 15:22:27.483980336 -0400 |
176 | @@ -1,8 +1,3 @@ | 188 | @@ -1,8 +1,3 @@ |
177 | -# These affect the generated bits/stdio_lim.h file. | 189 | -# These affect the generated bits/stdio_lim.h file. |
178 | -L_tmpnam = 20 | 190 | -L_tmpnam = 20 |
@@ -182,9 +194,9 @@ diff -Naur glibc-2.27/sysdeps/posix/Makefile glibc-2.27-patched/sysdeps/posix/Ma | |||
182 | 194 | ||
183 | ifeq ($(subdir)|$(have-thread-library),rt|no) | 195 | ifeq ($(subdir)|$(have-thread-library),rt|no) |
184 | # With NPTL, this lives in libpthread so it can be used for sem_open too. | 196 | # With NPTL, this lives in libpthread so it can be used for sem_open too. |
185 | diff -Naur glibc-2.27/sysdeps/unix/sysv/linux/bits/stdio_lim.h glibc-2.27-patched/sysdeps/unix/sysv/linux/bits/stdio_lim.h | 197 | diff -Naur glibc-2.25/sysdeps/unix/sysv/linux/bits/stdio_lim.h glibc-2.25-patched/sysdeps/unix/sysv/linux/bits/stdio_lim.h |
186 | --- glibc-2.27/sysdeps/unix/sysv/linux/bits/stdio_lim.h 1969-12-31 19:00:00.000000000 -0500 | 198 | --- glibc-2.25/sysdeps/unix/sysv/linux/bits/stdio_lim.h 1969-12-31 19:00:00.000000000 -0500 |
187 | +++ glibc-2.27-patched/sysdeps/unix/sysv/linux/bits/stdio_lim.h 2023-05-23 14:10:06.618633203 -0400 | 199 | +++ glibc-2.25-patched/sysdeps/unix/sysv/linux/bits/stdio_lim.h 2023-05-23 15:22:27.483980336 -0400 |
188 | @@ -0,0 +1,28 @@ | 200 | @@ -0,0 +1,28 @@ |
189 | +/* System specific stdio.h definitions. Linux version. | 201 | +/* System specific stdio.h definitions. Linux version. |
190 | + Copyright (C) 2023 Free Software Foundation, Inc. | 202 | + Copyright (C) 2023 Free Software Foundation, Inc. |
@@ -207,9 +219,9 @@ diff -Naur glibc-2.27/sysdeps/unix/sysv/linux/bits/stdio_lim.h glibc-2.27-patche | |||
207 | +#ifndef _BITS_STDIO_LIM_H | 219 | +#ifndef _BITS_STDIO_LIM_H |
208 | +#define _BITS_STDIO_LIM_H 1 | 220 | +#define _BITS_STDIO_LIM_H 1 |
209 | + | 221 | + |
210 | +#ifndef _STDIO_H | 222 | +//#ifndef _STDIO_H |
211 | +# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." | 223 | +//# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." |
212 | +#endif | 224 | +//#endif |
213 | + | 225 | + |
214 | +#define FILENAME_MAX 4096 | 226 | +#define FILENAME_MAX 4096 |
215 | + | 227 | + |
diff --git a/tools/toolchain-patches/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-4.9.4.diff b/tools/toolchain-patches/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-4.9.4.diff new file mode 100644 index 0000000000..cd98d3751c --- /dev/null +++ b/tools/toolchain-patches/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-4.9.4.diff | |||
@@ -0,0 +1,56 @@ | |||
1 | diff -Naur gcc-4.9.4/gcc/config/arm/t-arm-elf gcc-4.9.4-fixed/gcc/config/arm/t-arm-elf | ||
2 | --- gcc-4.9.4/gcc/config/arm/t-arm-elf 2014-01-02 17:23:26.000000000 -0500 | ||
3 | +++ gcc-4.9.4-fixed/gcc/config/arm/t-arm-elf 2020-07-01 22:11:01.198403110 -0400 | ||
4 | @@ -44,6 +44,11 @@ | ||
5 | #MULTILIB_EXCEPTIONS += *mcpu=fa526/*mfloat-abi=hard* | ||
6 | #MULTILIB_EXCEPTIONS += *mcpu=fa626/*mfloat-abi=hard* | ||
7 | |||
8 | +# We build a lib for each specific CPU Rockbox targets. If anyone knows a better | ||
9 | +# way to do this, please let us know. | ||
10 | +MULTILIB_OPTIONS += mcpu=arm7tdmi/mcpu=arm9tdmi/mcpu=arm9e/mcpu=arm926ej-s/mcpu=arm1136jf-s | ||
11 | +MULTILIB_DIRNAMES += arm7tdmi arm9tdmi arm9e arm926ej-s arm1136jf-s | ||
12 | + | ||
13 | # MULTILIB_OPTIONS += mcpu=ep9312 | ||
14 | # MULTILIB_DIRNAMES += ep9312 | ||
15 | # MULTILIB_EXCEPTIONS += *mthumb/*mcpu=ep9312* | ||
16 | @@ -56,8 +61,8 @@ | ||
17 | # MULTILIB_DIRNAMES += fpu soft | ||
18 | # MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard* | ||
19 | # | ||
20 | -# MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork | ||
21 | -# MULTILIB_DIRNAMES += normal interwork | ||
22 | +MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork | ||
23 | +MULTILIB_DIRNAMES += normal interwork | ||
24 | # | ||
25 | # MULTILIB_OPTIONS += fno-leading-underscore/fleading-underscore | ||
26 | # MULTILIB_DIRNAMES += elf under | ||
27 | diff -Naur gcc-4.9.4/libgcc/config/arm/t-bpabi gcc-4.9.4-fixed/libgcc/config/arm/t-bpabi | ||
28 | --- gcc-4.9.4/libgcc/config/arm/t-bpabi 2012-08-17 11:06:06.000000000 -0400 | ||
29 | +++ gcc-4.9.4-fixed/libgcc/config/arm/t-bpabi 2020-07-01 22:13:39.103762818 -0400 | ||
30 | @@ -17,4 +17,4 @@ | ||
31 | # On ARM, specifying -fnon-call-exceptions will needlessly pull in | ||
32 | # the unwinder in simple programs which use 64-bit division. Omitting | ||
33 | # the option is safe. | ||
34 | -LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions | ||
35 | +LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions -fno-non-call-exceptions | ||
36 | diff -Naur gcc-4.9.4/libgcc/Makefile.in gcc-4.9.4-fixed/libgcc/Makefile.in | ||
37 | --- gcc-4.9.4/libgcc/Makefile.in 2014-01-08 11:37:08.000000000 -0500 | ||
38 | +++ gcc-4.9.4-fixed/libgcc/Makefile.in 2020-07-01 22:11:01.199403087 -0400 | ||
39 | @@ -495,7 +495,7 @@ | ||
40 | ifeq ($(LIB2_DIVMOD_EXCEPTION_FLAGS),) | ||
41 | # Provide default flags for compiling divmod functions, if they haven't been | ||
42 | # set already by a target-specific Makefile fragment. | ||
43 | -LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions -fnon-call-exceptions | ||
44 | +LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions -fno-non-call-exceptions | ||
45 | endif | ||
46 | |||
47 | # Build LIB2_DIVMOD_FUNCS. | ||
48 | @@ -816,7 +816,7 @@ | ||
49 | # libgcc_eh.a, only LIB2ADDEH matters. If we do, only LIB2ADDEHSTATIC and | ||
50 | # LIB2ADDEHSHARED matter. (Usually all three are identical.) | ||
51 | |||
52 | -c_flags := -fexceptions | ||
53 | +c_flags := -fno-exceptions | ||
54 | |||
55 | ifeq ($(enable_shared),yes) | ||
56 | |||
diff --git a/tools/toolchain-patches/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-8.5.0.diff b/tools/toolchain-patches/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-8.5.0.diff deleted file mode 100644 index b320b969a5..0000000000 --- a/tools/toolchain-patches/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-8.5.0.diff +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | diff -Naur gcc-8.5.0/gcc/config/arm/arm_cmse.h gcc-8.5.0-patched/gcc/config/arm/ar | ||
2 | m_cmse.h | ||
3 | --- gcc-8.5.0/gcc/config/arm/arm_cmse.h 2021-05-14 04:42:08.000000000 -0400 | ||
4 | +++ gcc-8.5.0-patched/gcc/config/arm/arm_cmse.h 2023-04-17 14:32:56.547477547 -0400 | ||
5 | @@ -35,7 +35,7 @@ | ||
6 | #if __ARM_FEATURE_CMSE & 1 | ||
7 | |||
8 | #include <stddef.h> | ||
9 | -#include <stdint.h> | ||
10 | +//#include <stdint.h> | ||
11 | |||
12 | #ifdef __ARM_BIG_ENDIAN | ||
13 | |||
14 | diff -aur gcc-8.5.0/gcc/config/arm/t-arm-elf gcc-8.5.0-patched/gcc/config/arm/t-arm-elf | ||
15 | --- gcc-8.5.0/gcc/config/arm/t-arm-elf 2021-05-14 04:42:08.000000000 -0400 | ||
16 | +++ gcc-8.5.0-patched/gcc/config/arm/t-arm-elf 2022-11-26 23:16:30.714433566 -0500 | ||
17 | @@ -80,6 +80,10 @@ | ||
18 | MULTILIB_REQUIRED += marm/mfpu=auto/march=armv5te+fp/mfloat-abi=hard | ||
19 | MULTILIB_REQUIRED += mthumb/mfpu=auto/march=armv7+fp/mfloat-abi=hard | ||
20 | |||
21 | +# And we want to be able to disable interworking | ||
22 | +MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork | ||
23 | +MULTILIB_DIRNAMES += normal interwork | ||
24 | + | ||
25 | # PART 3 - Match rules | ||
26 | |||
27 | # Map all supported FPUs onto mfpu=auto | ||
28 | diff -aur gcc-8.5.0/libgcc/config/arm/t-bpabi gcc-8.5.0-patched/libgcc/config/arm/t-bpabi | ||
29 | --- gcc-8.5.0/libgcc/config/arm/t-bpabi 2021-05-14 04:42:10.000000000 -0400 | ||
30 | +++ gcc-8.5.0-patched/libgcc/config/arm/t-bpabi 2022-11-26 23:14:40.938038440 -0500 | ||
31 | @@ -17,4 +17,4 @@ | ||
32 | # On ARM, specifying -fnon-call-exceptions will needlessly pull in | ||
33 | # the unwinder in simple programs which use 64-bit division. Omitting | ||
34 | # the option is safe. | ||
35 | -LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions | ||
36 | +LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions -fno-non-call-exceptions | ||
37 | diff -aur gcc-8.5.0/libgcc/config/arm/cmse.c gcc-8.5.0-patch/libgcc/config/arm/cmse.c | ||
38 | --- gcc-8.5.0/libgcc/config/arm/cmse.c 2021-05-14 04:42:10.000000000 -0400 | ||
39 | +++ gcc-8.5.0-patched/libgcc/config/arm/cmse.c 2023-04-17 15:12:11.865456701 -0400 | ||
40 | @@ -36,7 +36,7 @@ | ||
41 | char *pb = (char *) p, *pe; | ||
42 | |||
43 | /* Check if the range wraps around. */ | ||
44 | - if (UINTPTR_MAX - (uintptr_t) p < size) | ||
45 | + if (__UINTPTR_MAX__ - (__UINTPTR_TYPE__) p < size) | ||
46 | return NULL; | ||
47 | |||
48 | /* Check if an unknown flag is present. */ | ||
49 | @@ -51,7 +51,7 @@ | ||
50 | |||
51 | /* Execute the right variant of the TT instructions. */ | ||
52 | pe = pb + size - 1; | ||
53 | - const int singleCheck = (((uintptr_t) pb ^ (uintptr_t) pe) < 32); | ||
54 | + const int singleCheck = (((__UINTPTR_TYPE__) pb ^ (__UINTPTR_TYPE__) pe) < 32); | ||
55 | switch (flags & known_secure_level) | ||
56 | { | ||
57 | case 0: | ||
58 | diff -aur gcc-8.5.0/libgcc/Makefile.in gcc-8.5.0-patched/libgcc/Makefile.in | ||
59 | --- gcc-8.5.0/libgcc/Makefile.in 2021-05-14 04:42:10.000000000 -0400 | ||
60 | +++ gcc-8.5.0-patched/libgcc/Makefile.in 2022-11-26 23:13:56.781304250 -0500 | ||
61 | @@ -526,7 +526,7 @@ | ||
62 | ifeq ($(LIB2_DIVMOD_EXCEPTION_FLAGS),) | ||
63 | # Provide default flags for compiling divmod functions, if they haven't been | ||
64 | # set already by a target-specific Makefile fragment. | ||
65 | -LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions -fnon-call-exceptions | ||
66 | +LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions -fno-non-call-exceptions | ||
67 | endif | ||
68 | |||
69 | # Build LIB2_DIVMOD_FUNCS. | ||
70 | @@ -847,7 +847,7 @@ | ||
71 | # libgcc_eh.a, only LIB2ADDEH matters. If we do, only LIB2ADDEHSTATIC and | ||
72 | # LIB2ADDEHSHARED matter. (Usually all three are identical.) | ||
73 | |||
74 | -c_flags := -fexceptions | ||
75 | +c_flags := -fno-exceptions | ||
76 | |||
77 | ifeq ($(enable_shared),yes) | ||