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:
		
							
								
								
									
										2
									
								
								lib/spack/env/cc
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								lib/spack/env/cc
									
									
									
									
										vendored
									
									
								
							@@ -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
									
								
							
							
						
						
									
										1
									
								
								lib/spack/env/f77
									
									
									
									
										vendored
									
									
										Symbolic link
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
cc
 | 
			
		||||
							
								
								
									
										1
									
								
								lib/spack/env/f90
									
									
									
									
										vendored
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								lib/spack/env/f90
									
									
									
									
										vendored
									
									
										Symbolic link
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
cc
 | 
			
		||||
							
								
								
									
										1
									
								
								lib/spack/env/f95
									
									
									
									
										vendored
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								lib/spack/env/f95
									
									
									
									
										vendored
									
									
										Symbolic link
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
cc
 | 
			
		||||
							
								
								
									
										1
									
								
								lib/spack/env/fc
									
									
									
									
										vendored
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								lib/spack/env/fc
									
									
									
									
										vendored
									
									
										Symbolic link
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
cc
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user