summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2017-03-24 14:56:22 -0500
committerGitHub <noreply@github.com>2017-03-24 14:56:22 -0500
commit1fe987949f22f98e9f628f2958ac493fc4246409 (patch)
tree14b4e498d860cebd3bd4c3fc694689f0e9c33b9f /var
parent268d48b4078c8b38397fba3b6b3c1f143ab7194b (diff)
downloadspack-1fe987949f22f98e9f628f2958ac493fc4246409.tar.gz
spack-1fe987949f22f98e9f628f2958ac493fc4246409.tar.bz2
spack-1fe987949f22f98e9f628f2958ac493fc4246409.tar.xz
spack-1fe987949f22f98e9f628f2958ac493fc4246409.zip
Clean up the gcc package (#3511)
* Clean up the gcc package * Add preliminary testing support * Older versions of GCC do not depend on MPC * DejaGnu 1.4.4 cannot be built in parallel * Fix GCC test dir * Add two more deps required to run the testsuite
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/dejagnu/package.py4
-rw-r--r--var/spack/repos/builtin/packages/gcc/package.py48
2 files changed, 33 insertions, 19 deletions
diff --git a/var/spack/repos/builtin/packages/dejagnu/package.py b/var/spack/repos/builtin/packages/dejagnu/package.py
index 4c83de7b67..0ea4aa260a 100644
--- a/var/spack/repos/builtin/packages/dejagnu/package.py
+++ b/var/spack/repos/builtin/packages/dejagnu/package.py
@@ -37,3 +37,7 @@ class Dejagnu(AutotoolsPackage):
depends_on('expect')
depends_on('tcl@8.5:')
+
+ # DejaGnu 1.4.4 cannot be built in parallel
+ # `make check` also fails but this can be ignored
+ parallel = False
diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py
index a9fed4d8dd..1fddb77299 100644
--- a/var/spack/repos/builtin/packages/gcc/package.py
+++ b/var/spack/repos/builtin/packages/gcc/package.py
@@ -59,9 +59,6 @@ class Gcc(AutotoolsPackage):
variant('binutils',
default=sys.platform != 'darwin',
description="Build via binutils")
- variant('gold',
- default=sys.platform != 'darwin',
- description="Build the gold linker plugin for ld-based LTO")
variant('piclibs',
default=False,
description="Build PIC versions of libgfortran.a and libstdc++.a")
@@ -70,12 +67,20 @@ class Gcc(AutotoolsPackage):
depends_on("gmp")
depends_on("mpc", when='@4.5:')
depends_on("isl", when='@5.0:')
- depends_on("binutils~libiberty", when='+binutils ~gold')
- depends_on("binutils~libiberty+gold", when='+binutils +gold')
+ depends_on("binutils~libiberty", when='+binutils')
# TODO: integrate these libraries.
# depends_on("ppl")
# depends_on("cloog")
+
+ # TODO: Add a 'test' deptype
+ # https://github.com/LLNL/spack/issues/1279
+ # depends_on('dejagnu@1.4.4', type='test')
+ # depends_on('expect', type='test')
+ # depends_on('tcl', type='test')
+ # depends_on('autogen@5.5.4:', type='test')
+ # depends_on('guile@1.4.1:', type='test')
+
if sys.platform == 'darwin':
patch('darwin/gcc-4.9.patch1', when='@4.9.3')
patch('darwin/gcc-4.9.patch2', when='@4.9.3')
@@ -88,9 +93,6 @@ class Gcc(AutotoolsPackage):
def configure_args(self):
spec = self.spec
prefix = self.spec.prefix
- # libjava/configure needs a minor fix to install into spack paths.
- filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure',
- string=True)
enabled_languages = set(('c', 'c++', 'fortran', 'java', 'objc'))
@@ -112,12 +114,16 @@ class Gcc(AutotoolsPackage):
new_header)
# Generic options to compile GCC
- options = ["--prefix=%s" % prefix, "--libdir=%s/lib64" % prefix,
- "--disable-multilib",
- "--enable-languages=" + ','.join(enabled_languages),
- "--with-mpc=%s" % spec['mpc'].prefix, "--with-mpfr=%s" %
- spec['mpfr'].prefix, "--with-gmp=%s" % spec['gmp'].prefix,
- "--enable-lto", "--with-quad"]
+ options = [
+ '--libdir={0}'.format(prefix.lib64),
+ '--disable-multilib',
+ '--enable-languages={0}'.format(','.join(enabled_languages)),
+ '--with-mpfr={0}'.format(spec['mpfr'].prefix),
+ '--with-gmp={0}'.format(spec['gmp'].prefix),
+ '--enable-lto',
+ '--with-quad'
+ ]
+
# Binutils
if spec.satisfies('+binutils'):
static_bootstrap_flags = "-static-libstdc++ -static-libgcc"
@@ -131,14 +137,18 @@ class Gcc(AutotoolsPackage):
"--with-as=%s/bin/as" % spec['binutils'].prefix
]
options.extend(binutils_options)
- # Isl
+
+ # MPC
+ if 'mpc' in spec:
+ options.append('--with-mpc={0}'.format(spec['mpc'].prefix))
+
+ # ISL
if 'isl' in spec:
- isl_options = ["--with-isl=%s" % spec['isl'].prefix]
- options.extend(isl_options)
+ options.append('--with-isl={0}'.format(spec['isl'].prefix))
+ # macOS
if sys.platform == 'darwin':
- darwin_options = ["--with-build-config=bootstrap-debug"]
- options.extend(darwin_options)
+ options.append('--with-build-config=bootstrap-debug')
return options