From f0260c84b44e36a4bae911404bdfb017bf1737de Mon Sep 17 00:00:00 2001 From: Jordan Galby <67924449+Jordan474@users.noreply.github.com> Date: Tue, 3 Oct 2023 17:28:55 +0200 Subject: Fix binutils regression on +gas~ld fix (#40292) --- var/spack/repos/builtin/packages/binutils/package.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py index 9e3e528c40..30aee917e0 100644 --- a/var/spack/repos/builtin/packages/binutils/package.py +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -96,13 +96,7 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage): when="@2.37:", ) variant("ld", default=False, description="Enable ld.") - # When you build binutils with ~ld and +gas and load it in your PATH, you - # may end up with incompatibilities between a potentially older system ld - # and a recent assembler. For instance the linker on ubuntu 16.04 from - # binutils 2.26 and the assembler from binutils 2.36.1 will result in: - # "unable to initialize decompress status for section .debug_info" - # when compiling with debug symbols on gcc. - variant("gas", default=False, when="+ld", description="Enable as assembler.") + variant("gas", default=False, description="Enable as assembler.") variant("interwork", default=False, description="Enable interwork.") variant("gprofng", default=False, description="Enable gprofng.", when="@2.39:") variant( @@ -162,6 +156,14 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage): "~lto", when="+pgo", msg="Profile-guided optimization enables link-time optimization" ) + # When you build binutils with ~ld and +gas and load it in your PATH, you + # may end up with incompatibilities between a potentially older system ld + # and a recent assembler. For instance the linker on ubuntu 16.04 from + # binutils 2.26 and the assembler from binutils 2.36.1 will result in: + # "unable to initialize decompress status for section .debug_info" + # when compiling with debug symbols on gcc. + conflicts("+gas", "~ld", msg="Assembler not always compatible with system ld") + @classmethod def determine_version(cls, exe): output = Executable(exe)("--version", output=str, error=str) -- cgit v1.2.3-60-g2f50