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
This commit is contained in:
Todd Gamblin 2014-07-09 01:28:23 -07:00
parent bd8838ca6d
commit 5f8724650a
7 changed files with 10 additions and 3 deletions

2
lib/spack/env/cc vendored
View File

@ -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'):

1
lib/spack/env/f77 vendored Symbolic link
View File

@ -0,0 +1 @@
cc

1
lib/spack/env/f90 vendored Symbolic link
View File

@ -0,0 +1 @@
cc

1
lib/spack/env/f95 vendored Symbolic link
View File

@ -0,0 +1 @@
cc

1
lib/spack/env/fc vendored Symbolic link
View File

@ -0,0 +1 @@
cc

View File

@ -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

View File

@ -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")