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") description="enable plugins, needed for gold linker")
variant('gold', default=True, description="build the gold linker") variant('gold', default=True, description="build the gold linker")
variant('libiberty', default=False, description='Also install libiberty.') 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('cr16.patch', when='@:2.29.1')
patch('update_symbol-2.26.patch', when='@2.26') patch('update_symbol-2.26.patch', when='@2.26')
depends_on('zlib') depends_on('zlib')
depends_on('gettext', when='+nls')
depends_on('m4', type='build') # Prior to 2.30, gold did not distribute the generated files and
depends_on('flex', type='build') # thus needs bison, even for a one-time build.
depends_on('bison', type='build') depends_on('m4', type='build', when='@:2.29.99 +gold')
depends_on('gettext') depends_on('bison', type='build', when='@:2.29.99 +gold')
def configure_args(self): def configure_args(self):
spec = self.spec spec = self.spec
configure_args = [ configure_args = [
'--with-system-zlib',
'--disable-dependency-tracking', '--disable-dependency-tracking',
'--disable-werror', '--disable-werror',
'--enable-interwork',
'--enable-multilib', '--enable-multilib',
'--enable-shared', '--enable-shared',
'--enable-64-bit-bfd', '--enable-64-bit-bfd',
'--enable-targets=all', '--enable-targets=all',
'--with-system-zlib',
'--with-sysroot=/', '--with-sysroot=/',
] ]
@ -80,6 +81,11 @@ def configure_args(self):
if '+libiberty' in spec: if '+libiberty' in spec:
configure_args.append('--enable-install-libiberty') 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, # To avoid namespace collisions with Darwin/BSD system tools,
# prefix executables with "g", e.g., gar, gnm; see Homebrew # prefix executables with "g", e.g., gar, gnm; see Homebrew
# https://github.com/Homebrew/homebrew-core/blob/master/Formula/binutils.rb # https://github.com/Homebrew/homebrew-core/blob/master/Formula/binutils.rb