From c00ece6cf23b228440c0cf1607dc51514b6cb6f9 Mon Sep 17 00:00:00 2001 From: Ben Cowan Date: Mon, 18 Sep 2023 10:20:19 -0600 Subject: Enabled building GCC 13.1 on darwin/aarch64. (#38667) --- var/spack/repos/builtin/packages/gcc/package.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 0af58650de..f4ce615e7f 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -337,11 +337,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 11.3-12.2 - conflicts( - "@:11.2,12.3:", + # aarch64/M1 is supported in GCC 11.3-12.2 and 13 + requires( + "@11.3,12.2,13.1:", when="target=aarch64: platform=darwin", - msg="Only GCC 11.3-12.2 support macOS M1 (aarch64)", + msg="Only GCC 11.3-12.2, 13.1+ support macOS M1 (aarch64)", ) # Newer binutils than RHEL's is required to run `as` on some instructions @@ -413,7 +413,17 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): sha256="a7843b5c6bf1401e40c20c72af69c8f6fc9754ae980bb4a5f0540220b3dcb62d", when="@12.2.0 target=aarch64:", ) - conflicts("+bootstrap", when="@11.3.0 target=aarch64:") + patch( + "https://raw.githubusercontent.com/Homebrew/formula-patches/5c206c47/gcc/gcc-13.1.0.diff", + sha256="cb4e8a89387f748a744da0273025d0dc2e3c76780cc390b18ada704676afea11", + when="@13.1.0 target=aarch64:", + ) + patch( + "https://raw.githubusercontent.com/Homebrew/formula-patches/3c5cbc8e9cf444a1967786af48e430588e1eb481/gcc/gcc-13.2.0.diff", + sha256="2df7ef067871a30b2531a2013b3db661ec9e61037341977bfc451e30bf2c1035", + when="@13.2.0 target=aarch64:", + ) + conflicts("+bootstrap", when="@11.3.0,13.1: target=aarch64:") # Use -headerpad_max_install_names in the build, # otherwise updated load commands won't fit in the Mach-O header. -- cgit v1.2.3-60-g2f50