Another binutils fix (#23337)

* Building binutils with gold implies building ld

* add +ld to llvm to make the old concretizer happy and add +gas to gcc since that's used in the package.py

* Remove sys
This commit is contained in:
Harmen Stoppels 2021-05-02 23:27:43 +02:00 committed by GitHub
parent 83c46748e6
commit 3578132e76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import sys
class Binutils(AutotoolsPackage, GNUMirrorPackage):
"""GNU binutils, which contain the linker, assembler, objdump and others"""
@ -32,7 +30,7 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage):
variant('plugins', default=True,
description="enable plugins, needed for gold linker")
variant('gold', default=(sys.platform != 'darwin'),
variant('gold', default=False,
description="build the gold linker")
variant('libiberty', default=False, description='Also install libiberty.')
variant('nls', default=True, description='Enable Native Language Support')
@ -69,6 +67,10 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage):
# when compiling with debug symbols on gcc.
conflicts('+gas', '~ld', msg="Assembler not always compatible with system ld")
# When you build ld.gold you automatically get ld, even when you add the
# --disable-ld flag
conflicts('~ld', '+gold')
def configure_args(self):
spec = self.spec

View File

@ -131,7 +131,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
depends_on('diffutils', type='build')
depends_on('iconv', when='platform=darwin')
depends_on('gnat', when='languages=ada')
depends_on('binutils+ld+plugins~libiberty', when='+binutils', type=('build', 'link', 'run'))
depends_on('binutils+gas+ld+plugins~libiberty', when='+binutils', type=('build', 'link', 'run'))
depends_on('zip', type='build', when='languages=java')
depends_on('cuda', when='+nvptx')

View File

@ -172,7 +172,7 @@ class Llvm(CMakePackage, CudaPackage):
depends_on("py-six", when="@5.0.0: +lldb +python")
# gold support, required for some features
depends_on("binutils+gold+plugins", when="+gold")
depends_on("binutils+gold+ld+plugins", when="+gold")
# polly plugin
depends_on("gmp", when="@:3.6.999 +polly")