summaryrefslogtreecommitdiff
path: root/cross/avr-gcc/patches/patch-gcc_config_host-darwin.c
diff options
context:
space:
mode:
Diffstat (limited to 'cross/avr-gcc/patches/patch-gcc_config_host-darwin.c')
-rw-r--r--cross/avr-gcc/patches/patch-gcc_config_host-darwin.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/cross/avr-gcc/patches/patch-gcc_config_host-darwin.c b/cross/avr-gcc/patches/patch-gcc_config_host-darwin.c
new file mode 100644
index 00000000000..5c3c95a742a
--- /dev/null
+++ b/cross/avr-gcc/patches/patch-gcc_config_host-darwin.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-gcc_config_host-darwin.c,v 1.1 2022/04/15 16:56:07 tnn Exp $
+
+Add host hooks to allow hosting on Darwin/aarch64.
+The patch is done differently from the upstream fix in order to be small.
+Delete this patch when updating to GCC 12 or later.
+
+--- gcc/config/host-darwin.c.orig 2021-04-08 11:56:28.000000000 +0000
++++ gcc/config/host-darwin.c
+@@ -78,3 +78,9 @@ darwin_gt_pch_use_address (void *addr, s
+
+ return ret;
+ }
++
++#if defined(__aarch64__)
++#include "hosthooks.h"
++#include "hosthooks-def.h"
++const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
++#endif