summaryrefslogtreecommitdiff
path: root/cross
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2022-04-15 16:56:06 +0000
committertnn <tnn@pkgsrc.org>2022-04-15 16:56:06 +0000
commite1fd88bd5c90e42eb9a1ea18c196564dc2e03db8 (patch)
tree1c61827bb48399f58fb5ed909fbc35495653fdec /cross
parent8272f5d40acc5dc5feb75b743aeebbb26486cd8e (diff)
downloadpkgsrc-e1fd88bd5c90e42eb9a1ea18c196564dc2e03db8.tar.gz
cross/*gcc: kludge in support for Darwin/aarch64 hosts in old GCC packages
Diffstat (limited to 'cross')
-rw-r--r--cross/aarch64-none-elf-gcc/distinfo5
-rw-r--r--cross/aarch64-none-elf-gcc/patches/patch-gcc_config_aarch64_aarch64.h11
-rw-r--r--cross/aarch64-none-elf-gcc/patches/patch-gcc_config_host-darwin.c18
-rw-r--r--cross/arm-none-eabi-gcc/distinfo3
-rw-r--r--cross/arm-none-eabi-gcc/patches/patch-gcc_config_host-darwin.c18
-rw-r--r--cross/avr-gcc/distinfo3
-rw-r--r--cross/avr-gcc/patches/patch-gcc_config_host-darwin.c18
-rw-r--r--cross/h8300-elf-gcc/distinfo3
-rw-r--r--cross/h8300-elf-gcc/patches/patch-gcc_config_host-darwin.c18
-rw-r--r--cross/mipsel-none-elf-gcc/distinfo3
-rw-r--r--cross/mipsel-none-elf-gcc/patches/patch-gcc_config_host-darwin.c18
-rw-r--r--cross/or1k-none-elf-gcc/distinfo3
-rw-r--r--cross/or1k-none-elf-gcc/patches/patch-gcc_config_host-darwin.c18
-rw-r--r--cross/pdp11-aout-gcc/distinfo3
-rw-r--r--cross/pdp11-aout-gcc/patches/patch-gcc_config_host-darwin.c18
-rw-r--r--cross/powerpc-none-elf-gcc/distinfo4
-rw-r--r--cross/powerpc-none-elf-gcc/patches/patch-gcc_config_host-darwin.c18
-rw-r--r--cross/ppc-morphos-gcc-10/distinfo3
-rw-r--r--cross/ppc-morphos-gcc-10/patches/patch-gcc_config_host-darwin.c18
-rw-r--r--cross/xtensa-esp32-elf-gcc/distinfo3
-rw-r--r--cross/xtensa-esp32-elf-gcc/patches/patch-gcc_config_host-darwin.c18
21 files changed, 204 insertions, 20 deletions
diff --git a/cross/aarch64-none-elf-gcc/distinfo b/cross/aarch64-none-elf-gcc/distinfo
index 8ea1b78864c..7b37191efd9 100644
--- a/cross/aarch64-none-elf-gcc/distinfo
+++ b/cross/aarch64-none-elf-gcc/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2021/10/26 10:07:50 nia Exp $
+$NetBSD: distinfo,v 1.6 2022/04/15 16:56:06 tnn Exp $
BLAKE2s (gcc-8.2.0.tar.xz) = da01bca052fefd4f0677ab396afc72f2bbf85786ec86ba38c95cbb7e8daf28aa
SHA512 (gcc-8.2.0.tar.xz) = 64898a165f67e136d802a92e7633bf1b06c85266027e52127ea025bf5fc2291b5e858288aac0bdba246e6cdf7c6ec88bc8e0e7f3f6f1985f4297710cafde56ed
@@ -7,7 +7,8 @@ BLAKE2s (newlib-3.0.0.tar.gz) = 021926cec30fb36863c7a68c595b3ca010cf367383e6826f
SHA512 (newlib-3.0.0.tar.gz) = d4730ce9a4fc4e62052e89d20d4a3855a103b3d1a2818e94c7a68626db285aa8db8e56a684103731916bfba3e581db88e3a93264034ea0f2880ee8976283c04f
Size (newlib-3.0.0.tar.gz) = 18168046 bytes
SHA1 (patch-contrib_download__prerequisites) = be9b02068b3d4d783e92bee66d480bb2bfe35a84
-SHA1 (patch-gcc_config_aarch64_aarch64.h) = e6536070ef4fe6cceb3df06d313b8666b8f404a9
+SHA1 (patch-gcc_config_aarch64_aarch64.h) = 7571479979f480ff1a1e7391e92fd30b1be99ac2
+SHA1 (patch-gcc_config_host-darwin.c) = bb6513d096bed62a3c40a6543c6c854e5c20ef9d
SHA1 (patch-gcc_system.h) = 72a75ff773b9b5f3d2f16f4ec7d29e032aba5f53
SHA1 (patch-libcc1_configure) = 0368733ddf79b109fcc7146b0baeb37ab31e634a
SHA1 (patch-libcc1_connection.cc) = 2acd56a6f62b29ed3f02eecb7bf103e4564a442c
diff --git a/cross/aarch64-none-elf-gcc/patches/patch-gcc_config_aarch64_aarch64.h b/cross/aarch64-none-elf-gcc/patches/patch-gcc_config_aarch64_aarch64.h
index 128d68aebaf..2b7c9ccc6de 100644
--- a/cross/aarch64-none-elf-gcc/patches/patch-gcc_config_aarch64_aarch64.h
+++ b/cross/aarch64-none-elf-gcc/patches/patch-gcc_config_aarch64_aarch64.h
@@ -1,11 +1,6 @@
-$NetBSD: patch-gcc_config_aarch64_aarch64.h,v 1.2 2018/11/23 05:30:45 ryoon Exp $
+$NetBSD: patch-gcc_config_aarch64_aarch64.h,v 1.3 2022/04/15 16:56:07 tnn Exp $
-driver-aarch64.o is not included for NetBSD and it is responsible for
-the definition of host_detect_local_cpu.
-
-Without it, we get an undefined reference.
-
-Similar to GCC bugzilla #77800 for arm.
+Disable -march=native for cross compilers.
--- gcc/config/aarch64/aarch64.h.orig 2018-02-21 14:05:45.000000000 +0000
+++ gcc/config/aarch64/aarch64.h
@@ -15,7 +10,7 @@ Similar to GCC bugzilla #77800 for arm.
-#if defined(__aarch64__)
+/* NetBSD does not export necessary info via /proc/cpuinfo. */
-+#if defined(__aarch64__) && !defined(__NetBSD__)
++#if defined(__aarch64__) && !defined(CROSS_DIRECTORY_STRUCTURE)
extern const char *host_detect_local_cpu (int argc, const char **argv);
#define HAVE_LOCAL_CPU_DETECT
# define EXTRA_SPEC_FUNCTIONS \
diff --git a/cross/aarch64-none-elf-gcc/patches/patch-gcc_config_host-darwin.c b/cross/aarch64-none-elf-gcc/patches/patch-gcc_config_host-darwin.c
new file mode 100644
index 00000000000..97ea2a0cf18
--- /dev/null
+++ b/cross/aarch64-none-elf-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 2018-01-03 10:03:58.000000000 +0000
++++ gcc/config/host-darwin.c
+@@ -75,3 +75,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
diff --git a/cross/arm-none-eabi-gcc/distinfo b/cross/arm-none-eabi-gcc/distinfo
index fa8f97cbbd7..99448413ab9 100644
--- a/cross/arm-none-eabi-gcc/distinfo
+++ b/cross/arm-none-eabi-gcc/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.11 2021/10/26 10:07:51 nia Exp $
+$NetBSD: distinfo,v 1.12 2022/04/15 16:56:07 tnn Exp $
BLAKE2s (gcc-8.3.0.tar.xz) = 395b2851da05d2ee21dfe3ec95e33482b63aeea7d37db423ffb7ebefd6547499
SHA512 (gcc-8.3.0.tar.xz) = 1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802
@@ -8,6 +8,7 @@ SHA512 (newlib-3.1.0.tar.gz) = efc4c3ab7153387780d141386bca5d3e20c9d25ae3e6b87cf
Size (newlib-3.1.0.tar.gz) = 17958952 bytes
SHA1 (patch-contrib_download__prerequisites) = be9b02068b3d4d783e92bee66d480bb2bfe35a84
SHA1 (patch-gcc_config_arm_arm.h) = 6d8cc2474cf9e902c766281315b75d6aadc42ed1
+SHA1 (patch-gcc_config_host-darwin.c) = bb6513d096bed62a3c40a6543c6c854e5c20ef9d
SHA1 (patch-gcc_system.h) = 72a75ff773b9b5f3d2f16f4ec7d29e032aba5f53
SHA1 (patch-libcc1_configure) = 0368733ddf79b109fcc7146b0baeb37ab31e634a
SHA1 (patch-libcc1_connection.cc) = 2acd56a6f62b29ed3f02eecb7bf103e4564a442c
diff --git a/cross/arm-none-eabi-gcc/patches/patch-gcc_config_host-darwin.c b/cross/arm-none-eabi-gcc/patches/patch-gcc_config_host-darwin.c
new file mode 100644
index 00000000000..97ea2a0cf18
--- /dev/null
+++ b/cross/arm-none-eabi-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 2018-01-03 10:03:58.000000000 +0000
++++ gcc/config/host-darwin.c
+@@ -75,3 +75,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
diff --git a/cross/avr-gcc/distinfo b/cross/avr-gcc/distinfo
index 21582cff0c4..2077143b06b 100644
--- a/cross/avr-gcc/distinfo
+++ b/cross/avr-gcc/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.14 2021/11/15 17:22:41 wiz Exp $
+$NetBSD: distinfo,v 1.15 2022/04/15 16:56:07 tnn Exp $
BLAKE2s (gcc-10.3.0.tar.xz) = 6d7c42f9386e5e32a3148122471cb207e5f65d7b5f53b3c9adba2d45a4f28715
SHA512 (gcc-10.3.0.tar.xz) = 2b2dd7453d48a398c29eaebd1422b70341001b8c90a62aee51e83344e7fdd8a8e45f82a4a9165bd7edc76dada912c932f4b6632c5636760fec4c5d7e402b3f86
Size (gcc-10.3.0.tar.xz) = 76692288 bytes
SHA1 (patch-contrib_download__prerequisites) = 16d02e5b026ce052b61eced69cfd6a627fea65f5
+SHA1 (patch-gcc_config_host-darwin.c) = ce5647dfb0bf93e222f30cdad3f00f5a4f633afc
SHA1 (patch-gcc_configure) = 613d33d859ec3f108046274d09396aeb344e04cf
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
diff --git a/cross/h8300-elf-gcc/distinfo b/cross/h8300-elf-gcc/distinfo
index 1e09f083328..d62d9060bd3 100644
--- a/cross/h8300-elf-gcc/distinfo
+++ b/cross/h8300-elf-gcc/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2021/10/26 10:07:53 nia Exp $
+$NetBSD: distinfo,v 1.5 2022/04/15 16:56:07 tnn Exp $
BLAKE2s (gcc-6.2.0.tar.bz2) = a11b22cf9748a09cecfa7a688f5b4840986932c8617042b56db955c08eb54d89
SHA512 (gcc-6.2.0.tar.bz2) = 1e8b826a3d44b9d5899309894e20c03abeb352bf3d273b8ad63af814c0ee2911f1a83ce1cd4cdd2d1cb0b3e3c34e9b7ae1b2ab83dfc649ee817ab05247c76198
@@ -6,5 +6,6 @@ Size (gcc-6.2.0.tar.bz2) = 99778648 bytes
BLAKE2s (newlib-2.4.0.tar.gz) = 7d83665cb71cd2b70f3723350539572e996d163fb22c15a8078f24748cd861bf
SHA512 (newlib-2.4.0.tar.gz) = c60665e793dce2368a5baf23560beb50f641e1831854d702d1d7629fb6e9200cf814527f29796792a3d2dff81afee4255723df99ceb0732f99dd9580a17d2ac0
Size (newlib-2.4.0.tar.gz) = 17574364 bytes
+SHA1 (patch-gcc_config_host-darwin.c) = 95c88d477a1687163f3430d0cf4470550d992d0a
SHA1 (patch-libcc1_connection.cc) = d32841d602cb4c71acd7f53a0a2f50dc501117a2
SHA1 (patch-libstdc++-v3_src_c++11_cow-stdexcept.cc) = 709efa4e8d287dbae16430f1f9917c2815494eb4
diff --git a/cross/h8300-elf-gcc/patches/patch-gcc_config_host-darwin.c b/cross/h8300-elf-gcc/patches/patch-gcc_config_host-darwin.c
new file mode 100644
index 00000000000..837ef1d59f5
--- /dev/null
+++ b/cross/h8300-elf-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 2016-01-04 14:30:50.000000000 +0000
++++ gcc/config/host-darwin.c
+@@ -75,3 +75,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
diff --git a/cross/mipsel-none-elf-gcc/distinfo b/cross/mipsel-none-elf-gcc/distinfo
index 8793155e1db..7cc9089e291 100644
--- a/cross/mipsel-none-elf-gcc/distinfo
+++ b/cross/mipsel-none-elf-gcc/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2021/10/26 10:07:55 nia Exp $
+$NetBSD: distinfo,v 1.4 2022/04/15 16:56:07 tnn Exp $
BLAKE2s (gcc-8.3.0.tar.xz) = 395b2851da05d2ee21dfe3ec95e33482b63aeea7d37db423ffb7ebefd6547499
SHA512 (gcc-8.3.0.tar.xz) = 1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802
@@ -7,6 +7,7 @@ BLAKE2s (newlib-3.1.0.tar.gz) = 293c92c6e8e0848083b3193b2c20a249eeb5e2ca318d0de7
SHA512 (newlib-3.1.0.tar.gz) = efc4c3ab7153387780d141386bca5d3e20c9d25ae3e6b87cf94c8df9d301ce5926dacdff9bd33aeb9781559d933c3d0ae77f4e5b46120d90792f75dbfde702c7
Size (newlib-3.1.0.tar.gz) = 17958952 bytes
SHA1 (patch-contrib_download__prerequisites) = be9b02068b3d4d783e92bee66d480bb2bfe35a84
+SHA1 (patch-gcc_config_host-darwin.c) = bb6513d096bed62a3c40a6543c6c854e5c20ef9d
SHA1 (patch-gcc_system.h) = 72a75ff773b9b5f3d2f16f4ec7d29e032aba5f53
SHA1 (patch-libcc1_configure) = 0368733ddf79b109fcc7146b0baeb37ab31e634a
SHA1 (patch-libcc1_connection.cc) = 2acd56a6f62b29ed3f02eecb7bf103e4564a442c
diff --git a/cross/mipsel-none-elf-gcc/patches/patch-gcc_config_host-darwin.c b/cross/mipsel-none-elf-gcc/patches/patch-gcc_config_host-darwin.c
new file mode 100644
index 00000000000..97ea2a0cf18
--- /dev/null
+++ b/cross/mipsel-none-elf-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 2018-01-03 10:03:58.000000000 +0000
++++ gcc/config/host-darwin.c
+@@ -75,3 +75,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
diff --git a/cross/or1k-none-elf-gcc/distinfo b/cross/or1k-none-elf-gcc/distinfo
index e2d312f5363..5eeed241457 100644
--- a/cross/or1k-none-elf-gcc/distinfo
+++ b/cross/or1k-none-elf-gcc/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2021/10/26 10:07:55 nia Exp $
+$NetBSD: distinfo,v 1.4 2022/04/15 16:56:08 tnn Exp $
BLAKE2s (gcc-9.1.0.tar.xz) = 6a9cace7fb6446d96c7ec983ddf178493425f71c37db2a98f3f55bbccf726569
SHA512 (gcc-9.1.0.tar.xz) = b6134df027e734cee5395afd739fcfa4ea319a6017d662e54e89df927dea19d3fff7a6e35d676685383034e3db01c9d0b653f63574c274eeb15a2cb0bc7a1f28
@@ -7,6 +7,7 @@ BLAKE2s (newlib-3.1.0.tar.gz) = 293c92c6e8e0848083b3193b2c20a249eeb5e2ca318d0de7
SHA512 (newlib-3.1.0.tar.gz) = efc4c3ab7153387780d141386bca5d3e20c9d25ae3e6b87cf94c8df9d301ce5926dacdff9bd33aeb9781559d933c3d0ae77f4e5b46120d90792f75dbfde702c7
Size (newlib-3.1.0.tar.gz) = 17958952 bytes
SHA1 (patch-contrib_download__prerequisites) = 98427276ac8e6ca20f902dc616a70db45a40ad49
+SHA1 (patch-gcc_config_host-darwin.c) = 92dc785153a4ad0caeb00333a3c1a287dc4ef96b
SHA1 (patch-gcc_system.h) = d8686e881cd30a385840295761d222f752a37bf3
SHA1 (patch-libcc1_configure) = 8329d9b52badb38ffac3c25d07ed34f71c707cf2
SHA1 (patch-libcc1_connection.cc) = 6f90edc27d813738e5455bb6e9c7b3d6eeda9a15
diff --git a/cross/or1k-none-elf-gcc/patches/patch-gcc_config_host-darwin.c b/cross/or1k-none-elf-gcc/patches/patch-gcc_config_host-darwin.c
new file mode 100644
index 00000000000..1014db5624b
--- /dev/null
+++ b/cross/or1k-none-elf-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:08 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 2019-01-01 12:31:55.000000000 +0000
++++ gcc/config/host-darwin.c
+@@ -75,3 +75,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
diff --git a/cross/pdp11-aout-gcc/distinfo b/cross/pdp11-aout-gcc/distinfo
index c3fc158b0d0..a6345f8208f 100644
--- a/cross/pdp11-aout-gcc/distinfo
+++ b/cross/pdp11-aout-gcc/distinfo
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.5 2021/10/26 10:07:55 nia Exp $
+$NetBSD: distinfo,v 1.6 2022/04/15 16:56:08 tnn Exp $
BLAKE2s (gcc-8.2.0.tar.xz) = da01bca052fefd4f0677ab396afc72f2bbf85786ec86ba38c95cbb7e8daf28aa
SHA512 (gcc-8.2.0.tar.xz) = 64898a165f67e136d802a92e7633bf1b06c85266027e52127ea025bf5fc2291b5e858288aac0bdba246e6cdf7c6ec88bc8e0e7f3f6f1985f4297710cafde56ed
Size (gcc-8.2.0.tar.xz) = 63460876 bytes
SHA1 (patch-contrib_download__prerequisites) = be9b02068b3d4d783e92bee66d480bb2bfe35a84
+SHA1 (patch-gcc_config_host-darwin.c) = bb6513d096bed62a3c40a6543c6c854e5c20ef9d
SHA1 (patch-gcc_system.h) = 72a75ff773b9b5f3d2f16f4ec7d29e032aba5f53
SHA1 (patch-libcc1_configure) = 0368733ddf79b109fcc7146b0baeb37ab31e634a
SHA1 (patch-libcc1_connection.cc) = 2acd56a6f62b29ed3f02eecb7bf103e4564a442c
diff --git a/cross/pdp11-aout-gcc/patches/patch-gcc_config_host-darwin.c b/cross/pdp11-aout-gcc/patches/patch-gcc_config_host-darwin.c
new file mode 100644
index 00000000000..544a55aaca8
--- /dev/null
+++ b/cross/pdp11-aout-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:08 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 2018-01-03 10:03:58.000000000 +0000
++++ gcc/config/host-darwin.c
+@@ -75,3 +75,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
diff --git a/cross/powerpc-none-elf-gcc/distinfo b/cross/powerpc-none-elf-gcc/distinfo
index 6c9a042ac3d..3c8c2cca8f7 100644
--- a/cross/powerpc-none-elf-gcc/distinfo
+++ b/cross/powerpc-none-elf-gcc/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2021/10/26 10:07:56 nia Exp $
+$NetBSD: distinfo,v 1.4 2022/04/15 16:56:08 tnn Exp $
BLAKE2s (gcc-8.3.0.tar.xz) = 395b2851da05d2ee21dfe3ec95e33482b63aeea7d37db423ffb7ebefd6547499
SHA512 (gcc-8.3.0.tar.xz) = 1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802
@@ -7,7 +7,7 @@ BLAKE2s (newlib-3.1.0.tar.gz) = 293c92c6e8e0848083b3193b2c20a249eeb5e2ca318d0de7
SHA512 (newlib-3.1.0.tar.gz) = efc4c3ab7153387780d141386bca5d3e20c9d25ae3e6b87cf94c8df9d301ce5926dacdff9bd33aeb9781559d933c3d0ae77f4e5b46120d90792f75dbfde702c7
Size (newlib-3.1.0.tar.gz) = 17958952 bytes
SHA1 (patch-contrib_download__prerequisites) = be9b02068b3d4d783e92bee66d480bb2bfe35a84
-SHA1 (patch-gcc_config_arm_arm.h) = 6d8cc2474cf9e902c766281315b75d6aadc42ed1
+SHA1 (patch-gcc_config_host-darwin.c) = bb6513d096bed62a3c40a6543c6c854e5c20ef9d
SHA1 (patch-gcc_system.h) = 72a75ff773b9b5f3d2f16f4ec7d29e032aba5f53
SHA1 (patch-libcc1_configure) = 0368733ddf79b109fcc7146b0baeb37ab31e634a
SHA1 (patch-libcc1_connection.cc) = 2acd56a6f62b29ed3f02eecb7bf103e4564a442c
diff --git a/cross/powerpc-none-elf-gcc/patches/patch-gcc_config_host-darwin.c b/cross/powerpc-none-elf-gcc/patches/patch-gcc_config_host-darwin.c
new file mode 100644
index 00000000000..544a55aaca8
--- /dev/null
+++ b/cross/powerpc-none-elf-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:08 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 2018-01-03 10:03:58.000000000 +0000
++++ gcc/config/host-darwin.c
+@@ -75,3 +75,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
diff --git a/cross/ppc-morphos-gcc-10/distinfo b/cross/ppc-morphos-gcc-10/distinfo
index 1080a6882cf..23276551436 100644
--- a/cross/ppc-morphos-gcc-10/distinfo
+++ b/cross/ppc-morphos-gcc-10/distinfo
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.3 2021/10/26 10:07:56 nia Exp $
+$NetBSD: distinfo,v 1.4 2022/04/15 16:56:08 tnn Exp $
BLAKE2s (sdk-source-20210211.tar.xz) = 2beb02bed78ad24be545f436bcfe0af2cfec716c3c7a8b4c2a5a6f98c20f597b
SHA512 (sdk-source-20210211.tar.xz) = 7f4fcd370c2b57765ae81807ef66a54de4f44ef2bcc5659902e3097f7f834bfd29bc608e72c738c82b446d903c578f49f2fe7c0c22d62ef60a5cef8911944a33
Size (sdk-source-20210211.tar.xz) = 565963672 bytes
SHA1 (patch-config_override.m4) = 1ee0186b006a987dc57151a9d112654eabd24db9
+SHA1 (patch-gcc_config_host-darwin.c) = 62d75a4ce61a0ae42a756c9fd1476a329bb44600
SHA1 (patch-gcc_config_rs6000_morphos.h) = c3702354f0dea476ba1516896e67b857dbfe7700
SHA1 (patch-libcc1_configure.ac) = ca40be7af4a4ffc3a4fba1a0dbda76fcde1fa2d9
SHA1 (patch-libstdc++-v3_configure.ac) = 4db5bf349ca5ca8315eb1b9baf3cadd5f463e8b4
diff --git a/cross/ppc-morphos-gcc-10/patches/patch-gcc_config_host-darwin.c b/cross/ppc-morphos-gcc-10/patches/patch-gcc_config_host-darwin.c
new file mode 100644
index 00000000000..d78c3bcb87a
--- /dev/null
+++ b/cross/ppc-morphos-gcc-10/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:08 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 2020-07-23 06:35:17.000000000 +0000
++++ gcc/config/host-darwin.c
+@@ -75,3 +75,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
diff --git a/cross/xtensa-esp32-elf-gcc/distinfo b/cross/xtensa-esp32-elf-gcc/distinfo
index 0fd92dcfc50..41c9c06cab4 100644
--- a/cross/xtensa-esp32-elf-gcc/distinfo
+++ b/cross/xtensa-esp32-elf-gcc/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.6 2022/04/14 00:50:00 tnn Exp $
+$NetBSD: distinfo,v 1.7 2022/04/15 16:56:08 tnn Exp $
BLAKE2s (crosstool-NG-esp-2021r2-patch3.tar.gz) = 2013c2818fd818473d5a6d923108f6c80bd6b62345a1e2a835bb4ba9a5f104b7
SHA512 (crosstool-NG-esp-2021r2-patch3.tar.gz) = 65a4c60151fb13311c21092c9b575fa29cac1beb9642ed73940c2d5fb5b11b8129b73ccfab847a02fb99d0a6b596b98d7f54c40fdcf304a2b667ca78746ed2cb
@@ -9,6 +9,7 @@ Size (espressif-gcc-8.4.0-f9333cfc1a790dff864aea3478cb862cc442be30.tar.gz) = 102
BLAKE2s (newlib-esp32-2021r2-patch3_newlib-3_3_0.tar.gz) = f49c5ba7d678b9d05e6eb6abf543e5fc24ca4af1ca1d172edd028fe5f9396e1c
SHA512 (newlib-esp32-2021r2-patch3_newlib-3_3_0.tar.gz) = 24e2200b5e16db12a40ada1a03d01389214859382d06f2068a57fd4e8d87e4f74bf963e139fbfd3f24e5815ba2ead897b0ac190fc0848a1c49895ed0c8ab54ac
Size (newlib-esp32-2021r2-patch3_newlib-3_3_0.tar.gz) = 21938580 bytes
+SHA1 (patch-gcc_config_host-darwin.c) = 497f2d417755071e78e69e9a3b75754b29055b20
SHA1 (patch-gcc_system.h) = 72a75ff773b9b5f3d2f16f4ec7d29e032aba5f53
SHA1 (patch-newlib_libc_posix_collate.c) = 2916597f1ca3b7beb2f67a457d8f448e1da8f896
SHA1 (patch-newlib_libc_posix_regcomp.c) = acb145e6ac4a74b545ac335e034180166c20904d
diff --git a/cross/xtensa-esp32-elf-gcc/patches/patch-gcc_config_host-darwin.c b/cross/xtensa-esp32-elf-gcc/patches/patch-gcc_config_host-darwin.c
new file mode 100644
index 00000000000..8f7f24acf59
--- /dev/null
+++ b/cross/xtensa-esp32-elf-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:09 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-09-08 06:56:02.000000000 +0000
++++ gcc/config/host-darwin.c
+@@ -75,3 +75,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