From 26c4284cb68d24aab862741fde94b81c6ad00a8c Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Thu, 19 Feb 2026 07:42:46 -0500 Subject: [PATCH] py-pyhdf: add flags for gcc@14 --- repos/spack_repo/builtin/packages/py_pyhdf/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/repos/spack_repo/builtin/packages/py_pyhdf/package.py b/repos/spack_repo/builtin/packages/py_pyhdf/package.py index 883e164c2fd..575821b5cfe 100644 --- a/repos/spack_repo/builtin/packages/py_pyhdf/package.py +++ b/repos/spack_repo/builtin/packages/py_pyhdf/package.py @@ -37,6 +37,13 @@ class PyPyhdf(PythonPackage): depends_on("py-numpy@:1.24", when="@0.10.4", type=("build", "run")) depends_on("jpeg", type=("build", "run")) + def flag_handler(self, name, flags): + if name == "cflags": + if self.spec.satisfies("%gcc@14:"): + flags.append("-Wno-error=incompatible-pointer-types") + flags.append("-Wno-error=discarded-qualifiers") + return (flags, None, None) + def setup_build_environment(self, env: EnvironmentModifications) -> None: inc_dirs = [] lib_dirs = []