diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/gcc/package.py | 14 |
1 files 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 |