summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2022-09-26 09:21:25 -0500
committerGitHub <noreply@github.com>2022-09-26 16:21:25 +0200
commit1f6545c1c72b1d33fad984669b827e3397a0e88c (patch)
treed6b7a9df7f2673c7f76b5e30f823a82c46b21208 /var
parent677a862fb925411b1341efb122dc6de9ad8771bf (diff)
downloadspack-1f6545c1c72b1d33fad984669b827e3397a0e88c.tar.gz
spack-1f6545c1c72b1d33fad984669b827e3397a0e88c.tar.bz2
spack-1f6545c1c72b1d33fad984669b827e3397a0e88c.tar.xz
spack-1f6545c1c72b1d33fad984669b827e3397a0e88c.zip
gcc: add Apple Silicon support for newer versions (#32702)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/gcc/package.py20
1 files changed, 17 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py
index c7d0b0b0bf..6cb0b06316 100644
--- a/var/spack/repos/builtin/packages/gcc/package.py
+++ b/var/spack/repos/builtin/packages/gcc/package.py
@@ -317,11 +317,11 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
# on XCode 12.5
conflicts("+bootstrap", when="@:11.1 %apple-clang@12.0.5")
- # aarch64/M1 is supported in GCC 12+
+ # aarch64/M1 is supported in GCC 11.3-12.2
conflicts(
- "@:11.2,11.3.1:",
+ "@:11.2,12.3:",
when="target=aarch64: platform=darwin",
- msg="Only GCC 11.3.0 supports macOS M1 (aarch64)",
+ msg="Only GCC 11.3-12.2 support macOS M1 (aarch64)",
)
# Newer binutils than RHEL's is required to run `as` on some instructions
@@ -331,6 +331,9 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
# GCC 11 requires GCC 4.8 or later (https://gcc.gnu.org/gcc-11/changes.html)
conflicts("%gcc@:4.7", when="@11:")
+ # https://github.com/iains/gcc-12-branch/issues/6
+ conflicts("%apple-clang@14:")
+
if sys.platform == "darwin":
# Fix parallel build on APFS filesystem
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797
@@ -371,6 +374,17 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
sha256="e02006b7ec917cc1390645d95735a6a866caed0dfe506d5bef742f7862cab218",
when="@11.3.0 target=aarch64:",
)
+ # https://github.com/iains/gcc-12-branch
+ patch(
+ "https://raw.githubusercontent.com/Homebrew/formula-patches/76677f2b/gcc/gcc-12.1.0-arm.diff",
+ sha256="a000f1d9cb1dd98c7c4ef00df31435cd5d712d2f9d037ddc044f8bf82a16cf35",
+ when="@12.1.0 target=aarch64:",
+ )
+ patch(
+ "https://raw.githubusercontent.com/Homebrew/formula-patches/1d184289/gcc/gcc-12.2.0-arm.diff",
+ sha256="a7843b5c6bf1401e40c20c72af69c8f6fc9754ae980bb4a5f0540220b3dcb62d",
+ when="@12.2.0 target=aarch64:",
+ )
conflicts("+bootstrap", when="@11.3.0 target=aarch64:")
# Use -headerpad_max_install_names in the build,