diff --git a/var/spack/repos/builtin/packages/ascent/package.py b/var/spack/repos/builtin/packages/ascent/package.py index 593c0f2596..f5f5390820 100644 --- a/var/spack/repos/builtin/packages/ascent/package.py +++ b/var/spack/repos/builtin/packages/ascent/package.py @@ -303,7 +303,10 @@ def hostconfig(self): ####################### c_compiler = env["SPACK_CC"] cpp_compiler = env["SPACK_CXX"] - f_compiler = env["SPACK_FC"] + if "+fortran" in spec: + f_compiler = env["SPACK_FC"] + else: + f_compiler = None ####################################################################### # Directly fetch the names of the actual compilers to create a diff --git a/var/spack/repos/builtin/packages/conduit/package.py b/var/spack/repos/builtin/packages/conduit/package.py index dc824b8c92..ce6cee87ac 100644 --- a/var/spack/repos/builtin/packages/conduit/package.py +++ b/var/spack/repos/builtin/packages/conduit/package.py @@ -287,7 +287,10 @@ def hostconfig(self): ####################### c_compiler = env["SPACK_CC"] cpp_compiler = env["SPACK_CXX"] - f_compiler = env["SPACK_FC"] + if "+fortran" in spec: + f_compiler = env["SPACK_FC"] + else: + f_compiler = None ####################################################################### # Directly fetch the names of the actual compilers to create a