From 6e36c71d6873d5b2feb9494f670b0277a9e68649 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Sun, 6 Feb 2022 07:48:16 -0500 Subject: Fix GCC 8 build on macOS bigsur %apple-clang@12.0.5 (#28795) * gcc: revise patch range on darwin * gcc: add conflict to work around bootstrap failure closes #23296 . See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100340 . ``` Comparing stages 2 and 3 Bootstrap comparison failure! gcc/tree-ssa-operands.o differs gcc/tree-ssanames.o differs gcc/ipa-inline.o differs gcc/tree-ssa-pre.o differs gcc/gimple-loop-interchange.o differs ... ``` 639 total differences. * gcc: bump conflict up to correct later version --- var/spack/repos/builtin/packages/gcc/package.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 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 131c623284..ae7012db0d 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -226,8 +226,14 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): # Binutils can't build ld on macOS conflicts('+binutils', when='platform=darwin') + # Bootstrap comparison failure: + # see https://github.com/spack/spack/issues/23296 + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100340 + # on XCode 12.5 + conflicts('+bootstrap', when='@:11.1 %apple-clang@12.0.5') + # aarch64/M1 is supported in GCC 12+ - conflicts('@:11.99', when='target=aarch64: platform=darwin', + conflicts('@:11', 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 @@ -252,7 +258,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): # https://github.com/Homebrew/homebrew-core/pull/39041 patch('https://raw.githubusercontent.com/Homebrew/formula-patches/master/gcc/8.3.0-xcode-bug-_Atomic-fix.patch', sha256='33ee92bf678586357ee8ab9d2faddf807e671ad37b97afdd102d5d153d03ca84', - when='@6:8') + when='@6:8.3') if macos_version() >= Version('10.15'): # Fix system headers for Catalina SDK # (otherwise __OSX_AVAILABLE_STARTING ends up undefined) -- cgit v1.2.3-60-g2f50