Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release/1.8.0: bug fix for compiling [email protected] with gfortran < 10 #477

Merged
merged 4 commits into from
Sep 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions var/spack/repos/builtin/packages/g2/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,19 @@ def cmake_args(self):

return args

# https://github.com/JCSDA/spack/issues/475
def flag_handler(self, name, flags):
if self.spec.satisfies("@3.5.1") and name == "fflags" and "gfortran" in self.compiler.fc:
with self.compiler.compiler_environment():
gfortran_major_version = int(
spack.compiler.get_compiler_version_output(
self.compiler.fc, "-dumpversion"
).split(".")[0]
)
if gfortran_major_version < 10:
flags.append("-fno-range-check")
return (None, None, flags)

def setup_run_environment(self, env):
precisions = (
self.spec.variants["precision"].value if self.spec.satisfies("@3.4.6:") else ("4", "d")
Expand Down
Loading