Skip to content

Commit

Permalink
patches for building gcc-10.3.0 on Apple Silicon
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-vd committed Dec 13, 2021
1 parent a558d3a commit 2882fb9
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions patches/gcc-10.3.0/0007-apple-silicon.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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-12-13 14:48:53.000000000 +0100
@@ -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;
diff -ru a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
--- a/gcc/config/aarch64/aarch64.h 2021-04-08 13:56:28.000000000 +0200
+++ b/gcc/config/aarch64/aarch64.h 2021-12-13 14:50:07.000000000 +0100
@@ -1200,7 +1200,7 @@
#define MCPU_TO_MARCH_SPEC_FUNCTIONS \
{ "rewrite_mcpu", aarch64_rewrite_mcpu },

-#if defined(__aarch64__)
+#if defined(__aarch64__) && ! defined(__APPLE__)
extern const char *host_detect_local_cpu (int argc, const char **argv);
#define HAVE_LOCAL_CPU_DETECT
# define EXTRA_SPEC_FUNCTIONS \

0 comments on commit 2882fb9

Please sign in to comment.