Skip to content

Commit

Permalink
Darwin, Arm64 : Initial support for the self-host driver.
Browse files Browse the repository at this point in the history
At present, this just includes the generic Darwin stuff.
  • Loading branch information
iains committed Oct 28, 2021
1 parent 126235e commit 5757cce
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gcc/config.host
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ case ${host} in
esac

case ${host} in
aarch64*-*-freebsd* | aarch64*-*-linux* | aarch64*-*-fuchsia*)
aarch64*-*-freebsd* | aarch64*-*-linux* | aarch64*-*-fuchsia* |\
aarch64-*-darwin* | arm64*-*-darwin*)
case ${target} in
aarch64*-*-*)
host_extra_gcc_objs="driver-aarch64.o"
Expand Down Expand Up @@ -251,6 +252,10 @@ case ${host} in
host_extra_gcc_objs="${host_extra_gcc_objs} driver-mingw32.o"
host_lto_plugin_soname=liblto_plugin.dll
;;
aarch64-*-darwin* | arm64-*-darwin*)
out_host_hook_obj="${out_host_hook_obj} host-aarch64-darwin.o"
host_xmake_file="${host_xmake_file} aarch64/x-darwin"
;;
i[34567]86-*-darwin* | x86_64-*-darwin*)
out_host_hook_obj="${out_host_hook_obj} host-i386-darwin.o"
host_xmake_file="${host_xmake_file} i386/x-darwin"
Expand Down
32 changes: 32 additions & 0 deletions gcc/config/aarch64/host-aarch64-darwin.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* Arm64-darwin host-specific hook definitions.
Copyright (C) 2020 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */

#define IN_TARGET_CODE 1

#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "hosthooks.h"
#include "hosthooks-def.h"
#include "config/host-darwin.h"

/* Darwin doesn't do anything special for arm64/aarch64 hosts; this file
exists just to include the generic config/host-darwin.h. */

const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
3 changes: 3 additions & 0 deletions gcc/config/aarch64/x-darwin
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
host-aarch64-darwin.o : $(srcdir)/config/aarch64/host-aarch64-darwin.c
$(COMPILE) $<
$(POSTCOMPILE)

0 comments on commit 5757cce

Please sign in to comment.