summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/binutils/package.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py
index 2f2a9642fa..9d2e72f3ad 100644
--- a/var/spack/repos/builtin/packages/binutils/package.py
+++ b/var/spack/repos/builtin/packages/binutils/package.py
@@ -45,29 +45,30 @@ class Binutils(AutotoolsPackage):
description="enable plugins, needed for gold linker")
variant('gold', default=True, description="build the gold linker")
variant('libiberty', default=False, description='Also install libiberty.')
+ variant('nls', default=True, description='Enable Native Language Support')
patch('cr16.patch', when='@:2.29.1')
patch('update_symbol-2.26.patch', when='@2.26')
depends_on('zlib')
+ depends_on('gettext', when='+nls')
- depends_on('m4', type='build')
- depends_on('flex', type='build')
- depends_on('bison', type='build')
- depends_on('gettext')
+ # Prior to 2.30, gold did not distribute the generated files and
+ # thus needs bison, even for a one-time build.
+ depends_on('m4', type='build', when='@:2.29.99 +gold')
+ depends_on('bison', type='build', when='@:2.29.99 +gold')
def configure_args(self):
spec = self.spec
configure_args = [
- '--with-system-zlib',
'--disable-dependency-tracking',
'--disable-werror',
- '--enable-interwork',
'--enable-multilib',
'--enable-shared',
'--enable-64-bit-bfd',
'--enable-targets=all',
+ '--with-system-zlib',
'--with-sysroot=/',
]
@@ -80,6 +81,11 @@ class Binutils(AutotoolsPackage):
if '+libiberty' in spec:
configure_args.append('--enable-install-libiberty')
+ if '+nls' in spec:
+ configure_args.append('--enable-nls')
+ else:
+ configure_args.append('--disable-nls')
+
# To avoid namespace collisions with Darwin/BSD system tools,
# prefix executables with "g", e.g., gar, gnm; see Homebrew
# https://github.com/Homebrew/homebrew-core/blob/master/Formula/binutils.rb