summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-12-08 10:15:40 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2015-12-08 10:15:40 -0800
commit0356ba34a09ce9d7fe671758cd0a2658cb6769e4 (patch)
treeb2838d35011135a4c29addeb6efc32f5b849363f
parente7ab8d476d310101b8ec9145a240216b252bae65 (diff)
parentc5b9732aed27e2061d2b50c02bc9933b5686c946 (diff)
downloadspack-0356ba34a09ce9d7fe671758cd0a2658cb6769e4.tar.gz
spack-0356ba34a09ce9d7fe671758cd0a2658cb6769e4.tar.bz2
spack-0356ba34a09ce9d7fe671758cd0a2658cb6769e4.tar.xz
spack-0356ba34a09ce9d7fe671758cd0a2658cb6769e4.zip
Merge pull request #223 from alalazo/fixes/gcc_sysroot_and_objdir
Fix for #177
-rw-r--r--var/spack/packages/binutils/package.py3
-rw-r--r--var/spack/packages/gcc/package.py9
2 files changed, 8 insertions, 4 deletions
diff --git a/var/spack/packages/binutils/package.py b/var/spack/packages/binutils/package.py
index cac0a0407f..be5a9b714b 100644
--- a/var/spack/packages/binutils/package.py
+++ b/var/spack/packages/binutils/package.py
@@ -20,7 +20,8 @@ class Binutils(Package):
'--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')
diff --git a/var/spack/packages/gcc/package.py b/var/spack/packages/gcc/package.py
index f58c1bd416..b5dc585be7 100644
--- a/var/spack/packages/gcc/package.py
+++ b/var/spack/packages/gcc/package.py
@@ -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 @@ class Gcc(Package):
"--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 @@ class Gcc(Package):
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")