diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 692718e6cc..e9d3a50d46 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -382,8 +382,9 @@ def make_defs(self): if "+consistent_fpcsr" in self.spec: make_defs += ["CONSISTENT_FPCSR=1"] - # Flang/f18 does not provide ETIME as an intrinsic - if self.spec.satisfies("%clang"): + # Flang/f18 does not provide ETIME as an intrinsic. + # Do not set TIMER variable if fortran is disabled. + if self.spec.satisfies("+fortran%clang"): make_defs.append("TIMER=INT_CPU_TIME") # Prevent errors in `as` assembler from newer instructions