Toolchain+Ports: Ignore -arch on macOS M1 hosts

CMake specifies -arch arm64 for our toolchain. Unfortunately that's an
option GCC only understands when built for macOS. This causes the build
to fail.

I haven't been able to get CMake to not specify that option so this adds
a dummy option to GCC.
This commit is contained in:
Gunnar Beutner 2021-07-24 03:11:29 +02:00 committed by Andreas Kling
parent 2cf4781d14
commit 12bfc7b3fc
2 changed files with 26 additions and 2 deletions

View file

@ -6330,4 +6330,16 @@ diff -Naur gcc-11.1.0/gcc/config/host-darwin.c gcc-11.1.0.serenity/gcc/config/ho
+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
/* Yes, this is really supposed to work. */
/* This allows for a pagesize of 16384, which we have on Darwin20, but should
/* This allows for a pagesize of 16384, which we have on Darwin20, but should
diff -Naur gcc-11.1.0/gcc/common.opt gcc-11.1.0.serenity/gcc/common.opt
--- gcc-11.1.0/gcc/common.opt 2021-07-24 02:52:10.000000000 +0200
+++ gcc-11.1.0.serenity/gcc/common.opt 2021-04-27 12:00:13.000000000 +0200
@@ -3490,4 +3490,8 @@
Common Var(flag_ipa_ra) Optimization
Use caller save register across calls if possible.
+arch
+Driver Ignore Separate
+-arch <name> Generate output for architecture <name>.
+
; This comment is to ensure we retain the blank line above.

View file

@ -6330,4 +6330,16 @@ diff -Naur gcc-11.1.0/gcc/config/host-darwin.c gcc-11.1.0.serenity/gcc/config/ho
+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
/* Yes, this is really supposed to work. */
/* This allows for a pagesize of 16384, which we have on Darwin20, but should
/* This allows for a pagesize of 16384, which we have on Darwin20, but should
diff -Naur gcc-11.1.0/gcc/common.opt gcc-11.1.0.serenity/gcc/common.opt
--- gcc-11.1.0/gcc/common.opt 2021-07-24 02:52:10.000000000 +0200
+++ gcc-11.1.0.serenity/gcc/common.opt 2021-04-27 12:00:13.000000000 +0200
@@ -3490,4 +3490,8 @@
Common Var(flag_ipa_ra) Optimization
Use caller save register across calls if possible.
+arch
+Driver Ignore Separate
+-arch <name> Generate output for architecture <name>.
+
; This comment is to ensure we retain the blank line above.