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.
This commit is contained in:
Mark W. Krentel 2018-08-29 22:32:41 -05:00 committed by scheibelp
parent 1383834d15
commit e860307c31

View file

@ -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 @@ def configure_args(self):
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