Commit 0356ba34 authored by Todd Gamblin's avatar Todd Gamblin
Browse files

Merge pull request #223 from alalazo/fixes/gcc_sysroot_and_objdir

Fix for #177
parents e7ab8d47 c5b9732a
......@@ -20,7 +20,8 @@ def install(self, spec, prefix):
'--enable-multilib',
'--enable-shared',
'--enable-64-bit-bfd',
'--enable-targets=all']
'--enable-targets=all',
'--with-sysroot=/']
if '+libiberty' in spec:
configure_args.append('--enable-install-libiberty')
......
......@@ -38,6 +38,7 @@ class Gcc(Package):
DEPENDS_ON_ISL_PREDICATE = '@5.0:'
version('5.3.0', 'c9616fd448f980259c31de613e575719')
version('5.2.0', 'a51bcfeb3da7dd4c623e27207ed43467')
version('4.9.3', '6f831b4d251872736e8e9cc09746f327')
version('4.9.2', '4df8ee253b7f3863ad0b86359cd39c43')
......@@ -80,7 +81,8 @@ def install(self, spec, prefix):
"--with-quad"]
# Binutils
static_bootstrap_flags = "-static-libstdc++ -static-libgcc"
binutils_options = ["--with-stage1-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags),
binutils_options = ["--with-sysroot=/",
"--with-stage1-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags),
"--with-boot-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags),
"--with-ld=%s/bin/ld" % spec['binutils'].prefix,
"--with-as=%s/bin/as" % spec['binutils'].prefix]
......@@ -90,9 +92,10 @@ def install(self, spec, prefix):
isl_options = ["--with-isl=%s" % spec['isl'].prefix]
options.extend(isl_options)
with working_dir('spack-build', create=True):
build_dir = join_path(self.stage.path, 'spack-build')
configure = Executable( join_path(self.stage.source_path, 'configure') )
with working_dir(build_dir, create=True):
# Rest of install is straightforward.
configure = Executable('../configure')
configure(*options)
make()
make("install")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment