diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 431fcaa9da..b3a6cd68ac 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -193,6 +193,11 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): # Binutils can't build ld on macOS conflicts('+binutils', when='platform=darwin') + # 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', + msg='New GCC cannot use system assembler on RHEL6') + if sys.platform == 'darwin': # Fix parallel build on APFS filesystem # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797