guile: fix %oneapi fast math madness (#38691)

This commit is contained in:
Harmen Stoppels 2023-07-03 13:25:55 +02:00 committed by GitHub
parent f0add2428c
commit 3594203f64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,6 +48,14 @@ class Guile(AutotoolsPackage, GNUMirrorPackage):
conflicts("threads=posix", when="%intel")
conflicts("threads=dgux386", when="%intel")
def flag_handler(self, name, flags):
# Intel oneAPI's compiler enables fast math by default, which
# breaks Guile's build. See https://github.com/spack/spack/discussions/38689
if name == "cflags" and "%oneapi" in self.spec:
flags.append("-fp-model=precise")
return (flags, None, None)
def configure_args(self):
spec = self.spec