Add binutils as a gcc dependency so it doesn't use the system linker/assembler.

This commit is contained in:
Matthew LeGendre 2015-03-30 14:23:02 -07:00
parent 2b9dd718ae
commit 89731d4a7d
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,17 @@
from spack import *
class Binutils(Package):
"""GNU binutils, which contain the linker, assembler, objdump and others"""
homepage = "http://www.gnu.org/software/binutils/"
url = "ftp://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2"
version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66')
version('2.24', 'e0f71a7b2ddab0f8612336ac81d9636b')
version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e')
version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
make()
make("install")

View file

@ -47,6 +47,7 @@ class Gcc(Package):
depends_on("gmp")
depends_on("mpc") # when @4.5:
depends_on("libelf")
depends_on("binutils")
# Save these until we can do optional deps.
#depends_on("isl")
@ -73,6 +74,10 @@ def install(self, spec, prefix):
"--with-stage1-ldflags=%s" % self.rpath_args,
"--with-boot-ldflags=%s" % self.rpath_args,
"--enable-lto",
"--with-gnu-ld",
"--with-ld=%s/bin/ld" % spec['binutils'].prefix,
"--with-gnu-as",
"--with-as=%s/bin/as" % spec['binutils'].prefix,
"--with-quad")
make()
make("install")