GCC: add Apple M1 support (#30825)
Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>
This commit is contained in:
parent
bf2d44c87e
commit
8d4a5cb247
1 changed files with 8 additions and 2 deletions
|
@ -256,8 +256,8 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
|
||||||
conflicts('+bootstrap', when='@:11.1 %apple-clang@12.0.5')
|
conflicts('+bootstrap', when='@:11.1 %apple-clang@12.0.5')
|
||||||
|
|
||||||
# aarch64/M1 is supported in GCC 12+
|
# aarch64/M1 is supported in GCC 12+
|
||||||
conflicts('@:11', when='target=aarch64: platform=darwin',
|
conflicts('@:11.2,11.3.1:', when='target=aarch64: platform=darwin',
|
||||||
msg='Only GCC 12 and newer support macOS M1 (aarch64)')
|
msg='Only GCC 11.3.0 supports macOS M1 (aarch64)')
|
||||||
|
|
||||||
# Newer binutils than RHEL's is required to run `as` on some instructions
|
# 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)
|
# generated by new GCC (see https://github.com/spack/spack/issues/12235)
|
||||||
|
@ -292,6 +292,12 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
|
||||||
patch('https://github.com/iains/gcc-darwin-arm64/commit/20f61faaed3b335d792e38892d826054d2ac9f15.patch?full_index=1',
|
patch('https://github.com/iains/gcc-darwin-arm64/commit/20f61faaed3b335d792e38892d826054d2ac9f15.patch?full_index=1',
|
||||||
sha256='c0605179a856ca046d093c13cea4d2e024809ec2ad4bf3708543fc3d2e60504b', when='@11.2.0')
|
sha256='c0605179a856ca046d093c13cea4d2e024809ec2ad4bf3708543fc3d2e60504b', when='@11.2.0')
|
||||||
|
|
||||||
|
# Apple M1 support, created from branch of Darwin maintainer for GCC:
|
||||||
|
# https://github.com/iains/gcc-11-branch
|
||||||
|
patch('https://raw.githubusercontent.com/Homebrew/formula-patches/22dec3fc/gcc/gcc-11.3.0-arm.diff',
|
||||||
|
sha256='e02006b7ec917cc1390645d95735a6a866caed0dfe506d5bef742f7862cab218',
|
||||||
|
when='@11.3.0 target=aarch64:')
|
||||||
|
|
||||||
# Use -headerpad_max_install_names in the build,
|
# Use -headerpad_max_install_names in the build,
|
||||||
# otherwise updated load commands won't fit in the Mach-O header.
|
# otherwise updated load commands won't fit in the Mach-O header.
|
||||||
# This is needed because `gcc` avoids the superenv shim.
|
# This is needed because `gcc` avoids the superenv shim.
|
||||||
|
|
Loading…
Reference in a new issue