diff options
author | Aiden Grossman <39388941+boomanaiden154@users.noreply.github.com> | 2023-07-18 14:02:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-18 23:02:51 +0200 |
commit | 9a05dce3bf88ebe9c4d2a7b6f0a156d2d6fe2468 (patch) | |
tree | 33e4d93d046af53d03203a146aa719f483157162 | |
parent | ffc283ab8b6b5c7b791e07e358388d3062e4ab44 (diff) | |
download | spack-9a05dce3bf88ebe9c4d2a7b6f0a156d2d6fe2468.tar.gz spack-9a05dce3bf88ebe9c4d2a7b6f0a156d2d6fe2468.tar.bz2 spack-9a05dce3bf88ebe9c4d2a7b6f0a156d2d6fe2468.tar.xz spack-9a05dce3bf88ebe9c4d2a7b6f0a156d2d6fe2468.zip |
fftw: fix build with clang15+ (#38889)
In Clang 15, -Wint-conversion became an error instead of a warning,
breaking the fftw build for clang versions > 15. This patch fixes fftw
builds with clang 15+ by passing -Wno-error=int-conversion as a cflag.
-rw-r--r-- | var/spack/repos/builtin/packages/fftw/package.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index 9b87254451..0aab3f71f7 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -63,6 +63,13 @@ class FftwBase(AutotoolsPackage): return find_libraries(libraries, root=self.prefix, recursive=True) + def flag_handler(self, name, flags): + if name == "cflags": + if self.spec.satisfies("%clang@15:"): + flags.append("-Wno-error=int-conversion") + + return flags, None, None + def patch(self): # If fftw/config.h exists in the source tree, it will take precedence # over the copy in build dir. As only the latter has proper config |