diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index d8772b215e..83836cbf79 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -225,6 +225,10 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): # Binutils can't build ld on macOS conflicts('+binutils', when='platform=darwin') + # aarch64/M1 is supported in GCC 12+ + conflicts('@:11.99', when='target=aarch64: platform=darwin', + msg='Only GCC 12 and newer support macOS M1 (aarch64)') + # Newer binutils than RHEL's is required to run `as` on some instructions # generated by new GCC (see https://github.com/spack/spack/issues/12235) conflicts('~binutils', when='@7: os=rhel6',