From 3cbc26cfa6a3d23148e2ce62d6c80accf7fa3ca6 Mon Sep 17 00:00:00 2001 From: Carson Woods Date: Sun, 29 Mar 2020 23:05:11 -0500 Subject: [PATCH] Add additional configuration options for binutils (#15753) --- var/spack/repos/builtin/packages/binutils/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py index 4a647e7e88..60cd9563fa 100644 --- a/var/spack/repos/builtin/packages/binutils/package.py +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -35,6 +35,9 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage): variant('libiberty', default=False, description='Also install libiberty.') variant('nls', default=True, description='Enable Native Language Support') variant('headers', default=False, description='Install extra headers (e.g. ELF)') + variant('lto', default=False, description='Enable lto.') + variant('ld', default=False, description='Enable ld.') + variant('interwork', default=False, description='Enable interwork.') patch('cr16.patch', when='@:2.29.1') patch('update_symbol-2.26.patch', when='@2.26') @@ -68,6 +71,15 @@ def configure_args(self): '--with-sysroot=/', ] + if '+lto' in spec: + configure_args.append('--enable-lto') + + if '+ld' in spec: + configure_args.append('--enable-ld') + + if '+interwork' in spec: + configure_args.append('--enable-interwork') + if '+gold' in spec: configure_args.append('--enable-gold')