make gcc build on aarch64 (#17280)

This commit is contained in:
Greg Becker 2020-06-27 18:51:11 -05:00 committed by Gregory Becker
parent ac51bfb530
commit 476961782d

View File

@ -303,15 +303,9 @@ def configure_args(self):
# Binutils
if spec.satisfies('+binutils'):
stage1_ldflags = str(self.rpath_args)
boot_ldflags = stage1_ldflags + ' -static-libstdc++ -static-libgcc'
if '%gcc' in spec:
stage1_ldflags = boot_ldflags
binutils = spec['binutils'].prefix.bin
options.extend([
'--with-sysroot=/',
'--with-stage1-ldflags=' + stage1_ldflags,
'--with-boot-ldflags=' + boot_ldflags,
'--with-gnu-ld',
'--with-ld=' + binutils.ld,
'--with-gnu-as',
@ -344,6 +338,14 @@ def configure_args(self):
'--with-libiconv-prefix={0}'.format(spec['libiconv'].prefix)
])
# enable appropriate bootstrapping flags
stage1_ldflags = str(self.rpath_args)
boot_ldflags = stage1_ldflags + ' -static-libstdc++ -static-libgcc'
if '%gcc' in spec:
stage1_ldflags = boot_ldflags
options.append('--with-stage1-ldflags=' + stage1_ldflags)
options.append('--with-boot-ldflags=' + boot_ldflags)
return options
# run configure/make/make(install) for the nvptx-none target