diff --git a/patches/gcc-5.3.0/0021-apple-silicon.diff b/patches/gcc-5.3.0/0021-apple-silicon.diff new file mode 100644 index 00000000..57f8ebc8 --- /dev/null +++ b/patches/gcc-5.3.0/0021-apple-silicon.diff @@ -0,0 +1,18 @@ +diff -ru a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c +--- a/gcc/config/host-darwin.c 2021-05-14 10:42:08.000000000 +0200 ++++ b/gcc/config/host-darwin.c 2021-08-07 22:51:11.000000000 +0200 +@@ -22,6 +22,8 @@ + #include "coretypes.h" + #include "diagnostic-core.h" + #include "config/host-darwin.h" ++#include "hosthooks.h" ++#include "hosthooks-def.h" + + /* Yes, this is really supposed to work. */ + static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096))); +@@ -75,3 +77,5 @@ + + return ret; + } ++ ++const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER; diff --git a/patches/gcc-6.5.0/0026-apple-silicon.diff b/patches/gcc-6.5.0/0026-apple-silicon.diff new file mode 100644 index 00000000..57f8ebc8 --- /dev/null +++ b/patches/gcc-6.5.0/0026-apple-silicon.diff @@ -0,0 +1,18 @@ +diff -ru a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c +--- a/gcc/config/host-darwin.c 2021-05-14 10:42:08.000000000 +0200 ++++ b/gcc/config/host-darwin.c 2021-08-07 22:51:11.000000000 +0200 +@@ -22,6 +22,8 @@ + #include "coretypes.h" + #include "diagnostic-core.h" + #include "config/host-darwin.h" ++#include "hosthooks.h" ++#include "hosthooks-def.h" + + /* Yes, this is really supposed to work. */ + static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096))); +@@ -75,3 +77,5 @@ + + return ret; + } ++ ++const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER; diff --git a/patches/gcc-7.5.0/0023-apple-silicon.diff b/patches/gcc-7.5.0/0023-apple-silicon.diff new file mode 100644 index 00000000..57f8ebc8 --- /dev/null +++ b/patches/gcc-7.5.0/0023-apple-silicon.diff @@ -0,0 +1,18 @@ +diff -ru a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c +--- a/gcc/config/host-darwin.c 2021-05-14 10:42:08.000000000 +0200 ++++ b/gcc/config/host-darwin.c 2021-08-07 22:51:11.000000000 +0200 +@@ -22,6 +22,8 @@ + #include "coretypes.h" + #include "diagnostic-core.h" + #include "config/host-darwin.h" ++#include "hosthooks.h" ++#include "hosthooks-def.h" + + /* Yes, this is really supposed to work. */ + static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096))); +@@ -75,3 +77,5 @@ + + return ret; + } ++ ++const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER; diff --git a/patches/gcc-8.5.0/0022-apple-silicon.diff b/patches/gcc-8.5.0/0022-apple-silicon.diff new file mode 100644 index 00000000..57f8ebc8 --- /dev/null +++ b/patches/gcc-8.5.0/0022-apple-silicon.diff @@ -0,0 +1,18 @@ +diff -ru a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c +--- a/gcc/config/host-darwin.c 2021-05-14 10:42:08.000000000 +0200 ++++ b/gcc/config/host-darwin.c 2021-08-07 22:51:11.000000000 +0200 +@@ -22,6 +22,8 @@ + #include "coretypes.h" + #include "diagnostic-core.h" + #include "config/host-darwin.h" ++#include "hosthooks.h" ++#include "hosthooks-def.h" + + /* Yes, this is really supposed to work. */ + static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096))); +@@ -75,3 +77,5 @@ + + return ret; + } ++ ++const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER; diff --git a/patches/gcc-9.2.0/0020-apple-silicon.diff b/patches/gcc-9.2.0/0020-apple-silicon.diff new file mode 100644 index 00000000..26088fe8 --- /dev/null +++ b/patches/gcc-9.2.0/0020-apple-silicon.diff @@ -0,0 +1,18 @@ +diff -ru a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c +--- a/gcc/config/host-darwin.c 2019-01-01 13:31:55.000000000 +0100 ++++ b/gcc/config/host-darwin.c 2021-08-07 19:21:05.000000000 +0200 +@@ -22,6 +22,8 @@ + #include "coretypes.h" + #include "diagnostic-core.h" + #include "config/host-darwin.h" ++#include "hosthooks.h" ++#include "hosthooks-def.h" + + /* Yes, this is really supposed to work. */ + static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096))); +@@ -75,3 +77,5 @@ + + return ret; + } ++ ++const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER; diff --git a/patches/gcc-9.4.0/0020-apple-silicon.diff b/patches/gcc-9.4.0/0020-apple-silicon.diff new file mode 100644 index 00000000..83f94d6b --- /dev/null +++ b/patches/gcc-9.4.0/0020-apple-silicon.diff @@ -0,0 +1,18 @@ +diff -ru a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c +--- a/gcc/config/host-darwin.c 2021-04-08 13:56:28.000000000 +0200 ++++ b/gcc/config/host-darwin.c 2021-04-20 23:05:04.000000000 +0200 +@@ -22,6 +22,8 @@ + #include "coretypes.h" + #include "diagnostic-core.h" + #include "config/host-darwin.h" ++#include "hosthooks.h" ++#include "hosthooks-def.h" + + /* Yes, this is really supposed to work. */ + /* This allows for a pagesize of 16384, which we have on Darwin20, but should +@@ -78,3 +80,5 @@ + + return ret; + } ++ ++const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;