Skip to content

Commit dc9bd56

Browse files
committed
patches for building gcc on Apple Silicon
By @jannau in #116.
1 parent 3398364 commit dc9bd56

File tree

6 files changed

+108
-0
lines changed

6 files changed

+108
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff -ru a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c
2+
--- a/gcc/config/host-darwin.c 2021-05-14 10:42:08.000000000 +0200
3+
+++ b/gcc/config/host-darwin.c 2021-08-07 22:51:11.000000000 +0200
4+
@@ -22,6 +22,8 @@
5+
#include "coretypes.h"
6+
#include "diagnostic-core.h"
7+
#include "config/host-darwin.h"
8+
+#include "hosthooks.h"
9+
+#include "hosthooks-def.h"
10+
11+
/* Yes, this is really supposed to work. */
12+
static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096)));
13+
@@ -75,3 +77,5 @@
14+
15+
return ret;
16+
}
17+
+
18+
+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff -ru a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c
2+
--- a/gcc/config/host-darwin.c 2021-05-14 10:42:08.000000000 +0200
3+
+++ b/gcc/config/host-darwin.c 2021-08-07 22:51:11.000000000 +0200
4+
@@ -22,6 +22,8 @@
5+
#include "coretypes.h"
6+
#include "diagnostic-core.h"
7+
#include "config/host-darwin.h"
8+
+#include "hosthooks.h"
9+
+#include "hosthooks-def.h"
10+
11+
/* Yes, this is really supposed to work. */
12+
static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096)));
13+
@@ -75,3 +77,5 @@
14+
15+
return ret;
16+
}
17+
+
18+
+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff -ru a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c
2+
--- a/gcc/config/host-darwin.c 2021-05-14 10:42:08.000000000 +0200
3+
+++ b/gcc/config/host-darwin.c 2021-08-07 22:51:11.000000000 +0200
4+
@@ -22,6 +22,8 @@
5+
#include "coretypes.h"
6+
#include "diagnostic-core.h"
7+
#include "config/host-darwin.h"
8+
+#include "hosthooks.h"
9+
+#include "hosthooks-def.h"
10+
11+
/* Yes, this is really supposed to work. */
12+
static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096)));
13+
@@ -75,3 +77,5 @@
14+
15+
return ret;
16+
}
17+
+
18+
+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff -ru a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c
2+
--- a/gcc/config/host-darwin.c 2021-05-14 10:42:08.000000000 +0200
3+
+++ b/gcc/config/host-darwin.c 2021-08-07 22:51:11.000000000 +0200
4+
@@ -22,6 +22,8 @@
5+
#include "coretypes.h"
6+
#include "diagnostic-core.h"
7+
#include "config/host-darwin.h"
8+
+#include "hosthooks.h"
9+
+#include "hosthooks-def.h"
10+
11+
/* Yes, this is really supposed to work. */
12+
static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096)));
13+
@@ -75,3 +77,5 @@
14+
15+
return ret;
16+
}
17+
+
18+
+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff -ru a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c
2+
--- a/gcc/config/host-darwin.c 2019-01-01 13:31:55.000000000 +0100
3+
+++ b/gcc/config/host-darwin.c 2021-08-07 19:21:05.000000000 +0200
4+
@@ -22,6 +22,8 @@
5+
#include "coretypes.h"
6+
#include "diagnostic-core.h"
7+
#include "config/host-darwin.h"
8+
+#include "hosthooks.h"
9+
+#include "hosthooks-def.h"
10+
11+
/* Yes, this is really supposed to work. */
12+
static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096)));
13+
@@ -75,3 +77,5 @@
14+
15+
return ret;
16+
}
17+
+
18+
+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff -ru a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c
2+
--- a/gcc/config/host-darwin.c 2021-04-08 13:56:28.000000000 +0200
3+
+++ b/gcc/config/host-darwin.c 2021-04-20 23:05:04.000000000 +0200
4+
@@ -22,6 +22,8 @@
5+
#include "coretypes.h"
6+
#include "diagnostic-core.h"
7+
#include "config/host-darwin.h"
8+
+#include "hosthooks.h"
9+
+#include "hosthooks-def.h"
10+
11+
/* Yes, this is really supposed to work. */
12+
/* This allows for a pagesize of 16384, which we have on Darwin20, but should
13+
@@ -78,3 +80,5 @@
14+
15+
return ret;
16+
}
17+
+
18+
+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;

0 commit comments

Comments
 (0)