summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2014-07-09 01:28:23 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2014-07-09 01:28:23 -0700
commit5f8724650a9f7327961639e099cb0764605d1c62 (patch)
treee4d78360a1b23bd6f33d5754172989b57329750d /lib
parentbd8838ca6db5b1b234d42ce7175564645f5afa50 (diff)
downloadspack-5f8724650a9f7327961639e099cb0764605d1c62.tar.gz
spack-5f8724650a9f7327961639e099cb0764605d1c62.tar.bz2
spack-5f8724650a9f7327961639e099cb0764605d1c62.tar.xz
spack-5f8724650a9f7327961639e099cb0764605d1c62.zip
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
Diffstat (limited to 'lib')
-rwxr-xr-xlib/spack/env/cc2
l---------lib/spack/env/f771
l---------lib/spack/env/f901
l---------lib/spack/env/f951
l---------lib/spack/env/fc1
-rw-r--r--lib/spack/spack/build_environment.py3
6 files changed, 7 insertions, 2 deletions
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