diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 1970b1add4..6d1af7cc88 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -29,6 +29,8 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): version('master', branch='master') + version('11.1.0', sha256='4c4a6fb8a8396059241c2e674b85b351c26a5d678274007f076957afa1cc9ddf') + version('10.3.0', sha256='64f404c1a650f27fc33da242e1f2df54952e3963a49e06e73f6940f3223ac344') version('10.2.0', sha256='b8dd4368bb9c7f0b98188317ee0254dd8cc99d1e3a18d0ff146c855fe16c1d8c') version('10.1.0', sha256='b6898a23844b656f1b68691c5c012036c2e694ac4b53a8918d4712ad876e7ea2') @@ -125,7 +127,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): # GCC only tries to link with -lzstd but it requires # -pthread too when linking against libzstd.a, so # disable multithreading by default - depends_on('zstd ~multithread', when='@10:') + depends_on('zstd~multithread', when='@10:') depends_on('diffutils', type='build') depends_on('iconv', when='platform=darwin') depends_on('gnat', when='languages=ada') @@ -226,6 +228,9 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): conflicts('~binutils', when='@7: os=rhel6', msg='New GCC cannot use system assembler on RHEL6') + # GCC 11 requires GCC 4.8 or later (https://gcc.gnu.org/gcc-11/changes.html) + conflicts('%gcc@:4.7', when='@11:') + if sys.platform == 'darwin': # Fix parallel build on APFS filesystem # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797