CrayPE fix for binutils (#23500)

Allow for multiple definitions at link time (for CrayPE)

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
This commit is contained in:
lukebroskop 2021-05-17 11:26:15 -05:00 committed by GitHub
parent b462ccb565
commit de8027a820
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,6 +73,14 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage):
# --disable-ld flag
conflicts('~ld', '+gold')
def setup_build_environment(self, env):
if self.spec.satisfies('%cce'):
env.append_flags('LDFLAGS', '-Wl,-z,muldefs')
if '+nls' in spec:
env.append_flags('LDFLAGS', '-lintl')
def configure_args(self):
spec = self.spec
@ -101,7 +109,6 @@ def configure_args(self):
if '+nls' in spec:
args.append('--enable-nls')
args.append('LDFLAGS=-lintl')
else:
args.append('--disable-nls')