Skip to content
Snippets Groups Projects
Commit c8a83661 authored by cedricchevalier19's avatar cedricchevalier19 Committed by Peter Scheibel
Browse files

Fix gcc + binutils compilation. (#9024)


* fix binutils deptype for gcc

binutils needs to be a run dependency of gcc

* Fix gcc+binutils build on RHEL7+

static-libstdc++ is not available with system gcc.
Anyway, as it is for bootstraping, we do not really care depending on
a shared libstdc++.

Co-authored-by: default avatarMichael Kuhn <michael@ikkoku.de>
parent 4e4de51f
No related branches found
No related tags found
No related merge requests found
...@@ -115,7 +115,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): ...@@ -115,7 +115,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
depends_on('zstd', when='@10:') depends_on('zstd', when='@10:')
depends_on('iconv', when='platform=darwin') depends_on('iconv', when='platform=darwin')
depends_on('gnat', when='languages=ada') depends_on('gnat', when='languages=ada')
depends_on('binutils~libiberty', when='+binutils') depends_on('binutils~libiberty', when='+binutils', type=('build', 'link', 'run'))
depends_on('zip', type='build', when='languages=java') depends_on('zip', type='build', when='languages=java')
depends_on('cuda', when='+nvptx') depends_on('cuda', when='+nvptx')
...@@ -373,8 +373,6 @@ def configure_args(self): ...@@ -373,8 +373,6 @@ def configure_args(self):
# enable appropriate bootstrapping flags # enable appropriate bootstrapping flags
stage1_ldflags = str(self.rpath_args) stage1_ldflags = str(self.rpath_args)
boot_ldflags = stage1_ldflags + ' -static-libstdc++ -static-libgcc' 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-stage1-ldflags=' + stage1_ldflags)
options.append('--with-boot-ldflags=' + boot_ldflags) options.append('--with-boot-ldflags=' + boot_ldflags)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment