From cc284934490cfbf3bce53c0a0ae3c6997098c47c Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Sat, 27 Jun 2020 18:51:11 -0500 Subject: make gcc build on aarch64 (#17280) --- var/spack/repos/builtin/packages/gcc/package.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 04b2181b62..4c822b1198 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -335,15 +335,9 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): # 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', @@ -376,6 +370,14 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): '--with-libiconv-prefix={0}'.format(spec['iconv'].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 -- cgit v1.2.3-60-g2f50