···
1
-
This patch was produced by manually merging:
3
-
* <https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=74bfca7360910ae640c2c9c362fe9a4c0ebcc3ba>
4
-
* <https://github.com/iains/gcc-14-branch/tree/gcc-14.2-darwin-r2>
6
-
and then taking the diff between the result and the upstream GCC
7
-
commit, and excerpting only the files that have conflicts when
8
-
naively applying the branch’s diff to the snapshot. (This is
9
-
more files than the two that actually needed manual merge work –
10
-
`gcc/config/aarch64/aarch64-tune.md` and `libgcc/config.host` –
11
-
because `patch(1)` can’t do a three‐way merge using ancestor
14
-
diff --git a/gcc/config/aarch64/aarch64-tune.md b/gcc/config/aarch64/aarch64-tune.md
15
-
index 35b27ddb88..8ce2a93168 100644
16
-
--- a/gcc/config/aarch64/aarch64-tune.md
17
-
+++ b/gcc/config/aarch64/aarch64-tune.md
19
-
;; -*- buffer-read-only: t -*-
20
-
;; Generated automatically by gentune.sh from aarch64-cores.def
22
-
- "cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,ampere1b,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,cortexx1c,neoversen1,ares,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,fujitsu_monaka,tsv110,thunderx3t110,neoversev1,zeus,neoverse512tvb,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,cortexa510,cortexa520,cortexa710,cortexa715,cortexa720,cortexa725,cortexx2,cortexx3,cortexx4,cortexx925,neoversen2,cobalt100,neoversen3,neoversev2,grace,neoversev3,neoversev3ae,demeter,generic,generic_armv8_a,generic_armv9_a"
23
-
+ "cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,ampere1b,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,cortexx1c,neoversen1,ares,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,fujitsu_monaka,tsv110,thunderx3t110,neoversev1,zeus,neoverse512tvb,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,applea12,applem1,applem2,applem3,cortexa510,cortexa520,cortexa710,cortexa715,cortexa720,cortexa725,cortexx2,cortexx3,cortexx4,cortexx925,neoversen2,cobalt100,neoversen3,neoversev2,grace,neoversev3,neoversev3ae,demeter,generic,generic_armv8_a,generic_armv9_a"
24
-
(const (symbol_ref "((enum attr_tune) aarch64_tune)")))
25
-
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
26
-
index 0d8886c026..5370511bec 100644
27
-
--- a/gcc/config/darwin.h
28
-
+++ b/gcc/config/darwin.h
31
-
#define DARWIN_X86 0
32
-
#define DARWIN_PPC 0
33
-
+#define DARWIN_ARM64 0
35
-
#define OBJECT_FORMAT_MACHO 1
40
-
#define DARWIN_NOCOMPACT_UNWIND \
41
-
-" %:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind) "
43
-
+ %:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind)}"
45
-
/* In Darwin linker specs we can put -lcrt0.o and ld will search the library
46
-
path for crt0.o or -lcrtx.a and it will search for libcrtx.a. As for
49
-
"%{flto*:%<fcompare-debug*} \
50
-
%{flto} %{fno-lto} %{flto=*} \
53
-
+ %{fuse-ld=*:-fuse-ld=%*} " \
54
-
DARWIN_PLATFORM_ID \
55
-
LINK_COMPRESS_DEBUG_SPEC \
56
-
"%X %{s} %{t} %{Z} %{u*} \
57
-
@@ -979,7 +982,12 @@
58
-
{ "apple_kext_compatibility", 0, 0, false, true, false, false, \
59
-
darwin_handle_kext_attribute, NULL }, \
60
-
{ "weak_import", 0, 0, true, false, false, false, \
61
-
- darwin_handle_weak_import_attribute, NULL }
62
-
+ darwin_handle_weak_import_attribute, NULL }, \
63
-
+ { "availability", 0, -1, true, false, false, false, \
64
-
+ darwin_handle_availability_attribute, NULL }
66
-
+#undef TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P
67
-
+#define TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P darwin_attribute_takes_identifier_p
69
-
/* Make local constant labels linker-visible, so that if one follows a
70
-
weak_global constant, ld64 will be able to separate the atoms. */
71
-
@@ -1227,6 +1235,10 @@
72
-
#define TARGET_N_FORMAT_TYPES 1
73
-
#define TARGET_FORMAT_TYPES darwin_additional_format_types
75
-
+/* We want __builtin_unreachable to be expanded as a trap instruction. */
76
-
+#undef TARGET_UNREACHABLE_SHOULD_TRAP
77
-
+#define TARGET_UNREACHABLE_SHOULD_TRAP darwin_unreachable_traps_p
79
-
#ifndef USED_FOR_TARGET
80
-
extern void darwin_driver_init (unsigned int *,struct cl_decoded_option **);
81
-
#define GCC_DRIVER_HOST_INITIALIZATION \
82
-
diff --git a/libgcc/config.host b/libgcc/config.host
83
-
index 7332903704..ae4c91dee3 100644
84
-
--- a/libgcc/config.host
85
-
+++ b/libgcc/config.host
91
-
+aarch64*-*-* | arm64*-*-*)
95
-
@@ -236,22 +236,25 @@
97
-
tmake_file="$tmake_file t-slibgcc-darwin"
99
-
+ x86_64-*-darwin2[0-2]*)
100
-
+ tmake_file="t-darwin-min-11 t-darwin-libgccs1 $tmake_file"
103
-
tmake_file="t-darwin-min-11 $tmake_file"
106
-
- tmake_file="t-darwin-min-8 $tmake_file"
107
-
+ tmake_file="t-darwin-min-8 t-darwin-libgccs1 $tmake_file"
109
-
*-*-darwin9* | *-*-darwin1[0-7]*)
110
-
- tmake_file="t-darwin-min-5 $tmake_file"
111
-
+ tmake_file="t-darwin-min-5 t-darwin-libgccs1 $tmake_file"
114
-
- tmake_file="t-darwin-min-1 $tmake_file"
115
-
+ tmake_file="t-darwin-min-1 t-darwin-libgccs1 $tmake_file"
118
-
# Fall back to configuring for the oldest system known to work with
119
-
# all archs and the current sources.
120
-
- tmake_file="t-darwin-min-5 $tmake_file"
121
-
+ tmake_file="t-darwin-min-5 t-darwin-libgccs1 $tmake_file"
122
-
echo "Warning: libgcc configured to support macOS 10.5" 1>&2
125
-
@@ -277,7 +280,7 @@
126
-
if test "x$enable_darwin_at_rpath" = "xyes"; then
127
-
tmake_file="$tmake_file t-darwin-rpath "
129
-
- extra_parts="crt3.o libd10-uwfef.a crttms.o crttme.o libemutls_w.a"
130
-
+ extra_parts="crt3.o crttms.o crttme.o libemutls_w.a "
133
-
tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip"
134
-
@@ -421,6 +424,15 @@
135
-
tmake_file="${tmake_file} t-dfprules"
136
-
md_unwind_header=aarch64/aarch64-unwind.h
138
-
+aarch64*-*-darwin*)
139
-
+ extra_parts="$extra_parts crtfastmath.o libheapt_w.a"
140
-
+ tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
141
-
+ tmake_file="${tmake_file} ${cpu_type}/t-lse"
142
-
+ tmake_file="${tmake_file} t-crtfm t-dfprules"
143
-
+ tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp"
144
-
+ tmake_file="${tmake_file} ${cpu_type}/t-heap-trampoline"
145
-
+ md_unwind_header=aarch64/aarch64-unwind.h
147
-
aarch64*-*-freebsd*)
148
-
extra_parts="$extra_parts crtfastmath.o"
149
-
tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
150
-
@@ -728,14 +740,14 @@
151
-
tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi"
152
-
tm_file="$tm_file i386/darwin-lib.h"
153
-
extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o"
154
-
- extra_parts="$extra_parts crtfastmath.o libheapt_w.a"
155
-
+ extra_parts="$extra_parts crtfastmath.o libd10-uwfef.a libheapt_w.a"
156
-
tmake_file="${tmake_file} i386/t-heap-trampoline"
159
-
tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi"
160
-
tm_file="$tm_file i386/darwin-lib.h"
161
-
extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o"
162
-
- extra_parts="$extra_parts crtfastmath.o libheapt_w.a"
163
-
+ extra_parts="$extra_parts crtfastmath.o libd10-uwfef.a libheapt_w.a"
164
-
tmake_file="${tmake_file} i386/t-heap-trampoline"
166
-
i[34567]86-*-elfiamcu)
167
-
@@ -1218,12 +1230,14 @@
168
-
# We build the darwin10 EH shim for Rosetta (running on x86 machines).
169
-
tm_file="$tm_file i386/darwin-lib.h"
170
-
tmake_file="$tmake_file rs6000/t-ppc64-fp rs6000/t-ibm-ldouble"
171
-
+ extra_parts="$extra_parts libd10-uwfef.a "
172
-
extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o"
174
-
powerpc64-*-darwin*)
175
-
# We build the darwin10 EH shim for Rosetta (running on x86 machines).
176
-
tm_file="$tm_file i386/darwin-lib.h"
177
-
tmake_file="$tmake_file rs6000/t-darwin64 rs6000/t-ibm-ldouble"
178
-
+ extra_parts="$extra_parts libd10-uwfef.a "
179
-
extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o"
181
-
powerpc*-*-freebsd*)