Skip to content

Commit 834c874

Browse files
committed
Darwin, aarch64 : Initial support for the self-host driver.
At present, there is no special action needed for aarch64-darwin this just pulls in generic Darwin code. Signed-off-by: Iain Sandoe <[email protected]> gcc/ChangeLog: * config.host: Add support for aarch64-*-darwin. * config/aarch64/host-aarch64-darwin.c: New file. * config/aarch64/x-darwin: New file.
1 parent 7a300b4 commit 834c874

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed

gcc/config.host

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ case ${host} in
9999
esac
100100

101101
case ${host} in
102-
aarch64*-*-freebsd* | aarch64*-*-linux* | aarch64*-*-fuchsia*)
102+
aarch64*-*-freebsd* | aarch64*-*-linux* | aarch64*-*-fuchsia* |\
103+
aarch64*-*-darwin*)
103104
case ${target} in
104105
aarch64*-*-*)
105106
host_extra_gcc_objs="driver-aarch64.o"
@@ -251,6 +252,10 @@ case ${host} in
251252
host_extra_gcc_objs="${host_extra_gcc_objs} driver-mingw32.o"
252253
host_lto_plugin_soname=liblto_plugin.dll
253254
;;
255+
aarch64*-*-darwin*)
256+
out_host_hook_obj="${out_host_hook_obj} host-aarch64-darwin.o"
257+
host_xmake_file="${host_xmake_file} aarch64/x-darwin"
258+
;;
254259
i[34567]86-*-darwin* | x86_64-*-darwin*)
255260
out_host_hook_obj="${out_host_hook_obj} host-i386-darwin.o"
256261
host_xmake_file="${host_xmake_file} i386/x-darwin"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/* aarch64/arm64-darwin host-specific hook definitions.
2+
3+
Copyright The GNU Toolchain Authors.
4+
5+
This file is part of GCC.
6+
7+
GCC is free software; you can redistribute it and/or modify it under
8+
the terms of the GNU General Public License as published by the Free
9+
Software Foundation; either version 3, or (at your option) any later
10+
version.
11+
12+
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13+
WARRANTY; without even the implied warranty of MERCHANTABILITY or
14+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15+
for more details.
16+
17+
You should have received a copy of the GNU General Public License
18+
along with GCC; see the file COPYING3. If not see
19+
<http://www.gnu.org/licenses/>. */
20+
21+
#define IN_TARGET_CODE 1
22+
23+
#include "config.h"
24+
#include "system.h"
25+
#include "coretypes.h"
26+
#include "hosthooks.h"
27+
#include "hosthooks-def.h"
28+
#include "config/host-darwin.h"
29+
30+
/* Darwin doesn't do anything special for arm64/aarch64 hosts; this file
31+
exists just to include the generic config/host-darwin.h. */
32+
33+
const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;

gcc/config/aarch64/x-darwin

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
host-aarch64-darwin.o : $(srcdir)/config/aarch64/host-aarch64-darwin.c
2+
$(COMPILE) $<
3+
$(POSTCOMPILE)

0 commit comments

Comments
 (0)