@@ -10,6 +10,68 @@ index 4b937306ad0..bfd0375bd60 100644
1010 gcn) thread_header=config/gcn/gthr-gcn.h ;;
1111 lynx) thread_header=config/gthr-lynx.h ;;
1212 mipssde) thread_header=config/mips/gthr-mipssde.h ;;
13+ diff --git a/gcc/config.host b/gcc/config.host
14+ index 0a02c33cc80..38f7adc655e 100644
15+ --- a/gcc/config.host
16+ +++ b/gcc/config.host
17+ @@ -251,6 +251,10 @@ case ${host} in
18+ host_extra_gcc_objs="${host_extra_gcc_objs} driver-mingw32.o"
19+ host_lto_plugin_soname=liblto_plugin.dll
20+ ;;
21+ + aarch64-*-darwin*)
22+ + out_host_hook_obj="${out_host_hook_obj} host-aarch64-darwin.o"
23+ + host_xmake_file="${host_xmake_file} aarch64/x-darwin"
24+ + ;;
25+ i[34567]86-*-darwin* | x86_64-*-darwin*)
26+ out_host_hook_obj="${out_host_hook_obj} host-i386-darwin.o"
27+ host_xmake_file="${host_xmake_file} i386/x-darwin"
28+ diff --git a/gcc/config/aarch64/host-aarch64-darwin.c b/gcc/config/aarch64/host-aarch64-darwin.c
29+ new file mode 100644
30+ index 00000000000..92c38b0b9db
31+ --- /dev/null
32+ +++ b/gcc/config/aarch64/host-aarch64-darwin.c
33+ @@ -0,0 +1,32 @@
34+ + /* i386-darwin host-specific hook definitions.
35+ + Copyright (C) 2003-2021 Free Software Foundation, Inc.
36+ +
37+ + This file is part of GCC.
38+ +
39+ + GCC is free software; you can redistribute it and/or modify it under
40+ + the terms of the GNU General Public License as published by the Free
41+ + Software Foundation; either version 3, or (at your option) any later
42+ + version.
43+ +
44+ + GCC is distributed in the hope that it will be useful, but WITHOUT ANY
45+ + WARRANTY; without even the implied warranty of MERCHANTABILITY or
46+ + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
47+ + for more details.
48+ +
49+ + You should have received a copy of the GNU General Public License
50+ + along with GCC; see the file COPYING3. If not see
51+ + <http://www.gnu.org/licenses/>. */
52+ +
53+ + #define IN_TARGET_CODE 1
54+ +
55+ + #include "config.h"
56+ + #include "system.h"
57+ + #include "coretypes.h"
58+ + #include "hosthooks.h"
59+ + #include "hosthooks-def.h"
60+ + #include "config/host-darwin.h"
61+ +
62+ + /* Darwin doesn't do anything special for aarch64 hosts; this file exists just
63+ + to include config/host-darwin.h. */
64+ +
65+ + const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
66+ diff --git a/gcc/config/aarch64/x-darwin b/gcc/config/aarch64/x-darwin
67+ new file mode 100644
68+ index 00000000000..6d788d5e89c
69+ --- /dev/null
70+ +++ b/gcc/config/aarch64/x-darwin
71+ @@ -0,0 +1,3 @@
72+ + host-aarch64-darwin.o : $(srcdir)/config/aarch64/host-aarch64-darwin.c
73+ + $(COMPILE) $<
74+ + $(POSTCOMPILE)
1375diff --git a/gcc/config/i386/host-mingw32.c b/gcc/config/i386/host-mingw32.c
1476index 360a280b23a..2c03947999a 100644
1577--- a/gcc/config/i386/host-mingw32.c
0 commit comments