From e860307c31567df9e270673a89a4e4974e4bc11f Mon Sep 17 00:00:00 2001 From: "Mark W. Krentel" Date: Wed, 29 Aug 2018 22:32:41 -0500 Subject: binutils: add variant 'nls' for native language support (#9124) Add variant 'nls' for native language support with default True. The default inside binutils was always on, but this gives a way of turning it off, if desired. Adjust the dependencies. Flex is never used for a one-time build. Bison and m4 should not be needed, except that prior to rev 2.30, gold did not include its generated files, so bison is needed when +gold. Drop configure option --enable-interwork. This option does not exist. --- var/spack/repos/builtin/packages/binutils/package.py | 18 ++++++++++++------ 1 file 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 -- cgit v1.2.3-70-g09d2