From 5f8724650a9f7327961639e099cb0764605d1c62 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 9 Jul 2014 01:28:23 -0700 Subject: Fix for SPACK-35: Fortran not working properly - Spack needed symlinks in env for fortran compilers. - 'fc' is a bash bulitin, so can't use it for fortran compiler. - switched to 'f90' for this. - mpich 3 builds with fortran now. - enabled shared libs in mpich package --- lib/spack/env/cc | 2 +- lib/spack/env/f77 | 1 + lib/spack/env/f90 | 1 + lib/spack/env/f95 | 1 + lib/spack/env/fc | 1 + lib/spack/spack/build_environment.py | 3 ++- var/spack/packages/mpich/package.py | 4 +++- 7 files changed, 10 insertions(+), 3 deletions(-) create mode 120000 lib/spack/env/f77 create mode 120000 lib/spack/env/f90 create mode 120000 lib/spack/env/f95 create mode 120000 lib/spack/env/fc diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 4478747844..9e71d25caf 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -59,7 +59,7 @@ elif command in ('c++', 'CC', 'g++', 'clang++'): elif command in ('f77'): command = spack_f77 language = "Fortran 77" -elif command in ('fc'): +elif command in ('fc', 'f90', 'f95'): command = spack_fc language = "Fortran 90" elif command in ('ld', 'cpp'): diff --git a/lib/spack/env/f77 b/lib/spack/env/f77 new file mode 120000 index 0000000000..2652f5f42c --- /dev/null +++ b/lib/spack/env/f77 @@ -0,0 +1 @@ +cc \ No newline at end of file diff --git a/lib/spack/env/f90 b/lib/spack/env/f90 new file mode 120000 index 0000000000..2652f5f42c --- /dev/null +++ b/lib/spack/env/f90 @@ -0,0 +1 @@ +cc \ No newline at end of file diff --git a/lib/spack/env/f95 b/lib/spack/env/f95 new file mode 120000 index 0000000000..2652f5f42c --- /dev/null +++ b/lib/spack/env/f95 @@ -0,0 +1 @@ +cc \ No newline at end of file diff --git a/lib/spack/env/fc b/lib/spack/env/fc new file mode 120000 index 0000000000..2652f5f42c --- /dev/null +++ b/lib/spack/env/fc @@ -0,0 +1 @@ +cc \ No newline at end of file diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index b9d0c16353..38d5f70282 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -90,7 +90,7 @@ def set_compiler_environment_variables(pkg): os.environ['CC'] = 'cc' os.environ['CXX'] = 'c++' os.environ['F77'] = 'f77' - os.environ['FC'] = 'fc' + os.environ['FC'] = 'f90' # Set SPACK compiler variables so that our wrapper knows what to call if compiler.cc: @@ -173,6 +173,7 @@ def set_module_variables_for_package(pkg): m.std_cmake_args.append('-DCMAKE_FIND_FRAMEWORK=LAST') # Emulate some shell commands for convenience + m.pwd = os.getcwd m.cd = os.chdir m.mkdir = os.mkdir m.makedirs = os.makedirs diff --git a/var/spack/packages/mpich/package.py b/var/spack/packages/mpich/package.py index af9e8266dc..703614a587 100644 --- a/var/spack/packages/mpich/package.py +++ b/var/spack/packages/mpich/package.py @@ -38,6 +38,8 @@ class Mpich(Package): provides('mpi@:1', when='@1:') def install(self, spec, prefix): - configure("--prefix=" + prefix) + configure( + "--prefix=" + prefix, + "--enable-shared") make() make("install") -- cgit v1.2.3-60-g2f50