diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py index 8c1c1a7ffe..646392f5b9 100644 --- a/var/spack/repos/builtin/packages/cp2k/package.py +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -174,7 +174,11 @@ def edit(self, spec, prefix): cxxflags.append('-fp-model precise') fcflags.extend(['-fp-model source', '-heap-arrays 64']) elif '%gcc' in spec: - fcflags.extend(['-ffree-form', '-ffree-line-length-none']) + fcflags.extend([ + '-ffree-form', + '-ffree-line-length-none', + '-ggdb', # make sure we get proper Fortran backtraces + ]) elif '%pgi' in spec: fcflags.extend(['-Mfreeform', '-Mextend'])