Fix issue where binutils builds ld with ~ld (#22959)
Let's be very explicit and always add --enable or --disable.
This commit is contained in:
parent
e320b1d7e4
commit
e7d392c49a
1 changed files with 14 additions and 21 deletions
|
@ -63,7 +63,7 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage):
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
|
|
||||||
configure_args = [
|
args = [
|
||||||
'--disable-dependency-tracking',
|
'--disable-dependency-tracking',
|
||||||
'--disable-werror',
|
'--disable-werror',
|
||||||
'--enable-multilib',
|
'--enable-multilib',
|
||||||
|
@ -74,37 +74,30 @@ def configure_args(self):
|
||||||
'--with-sysroot=/',
|
'--with-sysroot=/',
|
||||||
]
|
]
|
||||||
|
|
||||||
if '+lto' in spec:
|
args += self.enable_or_disable('lto')
|
||||||
configure_args.append('--enable-lto')
|
args += self.enable_or_disable('ld')
|
||||||
|
args += self.enable_or_disable('interwork')
|
||||||
if '+ld' in spec:
|
args += self.enable_or_disable('gold')
|
||||||
configure_args.append('--enable-ld')
|
args += self.enable_or_disable('plugins')
|
||||||
|
|
||||||
if '+interwork' in spec:
|
|
||||||
configure_args.append('--enable-interwork')
|
|
||||||
|
|
||||||
if '+gold' in spec:
|
|
||||||
configure_args.append('--enable-gold')
|
|
||||||
|
|
||||||
if '+plugins' in spec:
|
|
||||||
configure_args.append('--enable-plugins')
|
|
||||||
|
|
||||||
if '+libiberty' in spec:
|
if '+libiberty' in spec:
|
||||||
configure_args.append('--enable-install-libiberty')
|
args.append('--enable-install-libiberty')
|
||||||
|
else:
|
||||||
|
args.append('--disable-install-libiberty')
|
||||||
|
|
||||||
if '+nls' in spec:
|
if '+nls' in spec:
|
||||||
configure_args.append('--enable-nls')
|
args.append('--enable-nls')
|
||||||
configure_args.append('LDFLAGS=-lintl')
|
args.append('LDFLAGS=-lintl')
|
||||||
else:
|
else:
|
||||||
configure_args.append('--disable-nls')
|
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
|
||||||
if spec.satisfies('platform=darwin'):
|
if spec.satisfies('platform=darwin'):
|
||||||
configure_args.append('--program-prefix=g')
|
args.append('--program-prefix=g')
|
||||||
|
|
||||||
return configure_args
|
return args
|
||||||
|
|
||||||
# 2.36 is missing some dependencies and requires serial make install.
|
# 2.36 is missing some dependencies and requires serial make install.
|
||||||
# https://sourceware.org/bugzilla/show_bug.cgi?id=27482
|
# https://sourceware.org/bugzilla/show_bug.cgi?id=27482
|
||||||
|
|
Loading…
Reference in a new issue