summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2021-05-02 23:27:43 +0200
committerGitHub <noreply@github.com>2021-05-02 23:27:43 +0200
commit3578132e76202c10a254345c0c47de1b76492783 (patch)
treecced624843b23b8716a1adb82b14a1839d21aadb
parent83c46748e6b781f47d3942d32142e2669df12d26 (diff)
downloadspack-3578132e76202c10a254345c0c47de1b76492783.tar.gz
spack-3578132e76202c10a254345c0c47de1b76492783.tar.bz2
spack-3578132e76202c10a254345c0c47de1b76492783.tar.xz
spack-3578132e76202c10a254345c0c47de1b76492783.zip
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
-rw-r--r--var/spack/repos/builtin/packages/binutils/package.py8
-rw-r--r--var/spack/repos/builtin/packages/gcc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/llvm/package.py2
3 files changed, 7 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py
index 97ec183660..7fc8013afe 100644
--- a/var/spack/repos/builtin/packages/binutils/package.py
+++ b/var/spack/repos/builtin/packages/binutils/package.py
@@ -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
diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py
index a2a7243bb0..fdc313a774 100644
--- a/var/spack/repos/builtin/packages/gcc/package.py
+++ b/var/spack/repos/builtin/packages/gcc/package.py
@@ -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')
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
index d6f1449189..d7adbddd72 100644
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -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")