summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Scott <hi@alecbcs.com>2024-05-14 08:24:36 -0700
committerGitHub <noreply@github.com>2024-05-14 17:24:36 +0200
commitc3576f712d3a3abb7137d29d30c02f0c7e637122 (patch)
tree9f9efb8eb6d90979cd43e891d60ec968b49e2db8
parent410e6a59b787dae0f4ff2d8bbdae7ecadd00f428 (diff)
downloadspack-c3576f712d3a3abb7137d29d30c02f0c7e637122.tar.gz
spack-c3576f712d3a3abb7137d29d30c02f0c7e637122.tar.bz2
spack-c3576f712d3a3abb7137d29d30c02f0c7e637122.tar.xz
spack-c3576f712d3a3abb7137d29d30c02f0c7e637122.zip
pkg-config: support apple-clang@15: (#44007)
-rw-r--r--var/spack/repos/builtin/packages/pkg-config/package.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/pkg-config/package.py b/var/spack/repos/builtin/packages/pkg-config/package.py
index 82cd66f78e..8888ffe559 100644
--- a/var/spack/repos/builtin/packages/pkg-config/package.py
+++ b/var/spack/repos/builtin/packages/pkg-config/package.py
@@ -53,17 +53,18 @@ class PkgConfig(AutotoolsPackage):
env.append_path("ACLOCAL_PATH", self.prefix.share.aclocal)
def configure_args(self):
+ spec = self.spec
config_args = ["--enable-shared"]
- if "+internal_glib" in self.spec:
+ if spec.satisfies("+internal_glib"):
# There's a bootstrapping problem here;
# glib uses pkg-config as well, so break
# the cycle by using the internal glib.
config_args.append("--with-internal-glib")
- c_name = self.spec.compiler.name
- if "oneapi" in c_name or "cce" in c_name:
- # Don't treat int-conversion warning as error with oneapi and cce.
- config_args.append("CFLAGS=-Wno-error=int-conversion")
+ for strict_compiler in ("%oneapi", "%cce", "%apple-clang@15:", "%clang@15:"):
+ if spec.satisfies(strict_compiler):
+ config_args.append("CFLAGS=-Wno-error=int-conversion")
+ break
return config_args