summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2024-05-13 20:11:27 +0200
committerGitHub <noreply@github.com>2024-05-13 20:11:27 +0200
commit4f111659ec53fd1a4a898eef61d8ab818006ba8b (patch)
treec1958ef81523a6d9a8183847733d75d0e1205765
parenteaf330f2a87c4492fe15b033320caca84f3a1ccc (diff)
downloadspack-4f111659ec53fd1a4a898eef61d8ab818006ba8b.tar.gz
spack-4f111659ec53fd1a4a898eef61d8ab818006ba8b.tar.bz2
spack-4f111659ec53fd1a4a898eef61d8ab818006ba8b.tar.xz
spack-4f111659ec53fd1a4a898eef61d8ab818006ba8b.zip
glibc: detect from "Free Software Foundation" not "gnu" (#44154)
which should be more generic
-rw-r--r--lib/spack/spack/util/libc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/spack/spack/util/libc.py b/lib/spack/spack/util/libc.py
index bef8859e3d..bcfbbec646 100644
--- a/lib/spack/spack/util/libc.py
+++ b/lib/spack/spack/util/libc.py
@@ -22,7 +22,7 @@ def _libc_from_ldd(ldd: str) -> Optional["spack.spec.Spec"]:
except Exception:
return None
- if not re.search(r"\b(?:gnu|glibc|arm)\b", stdout, re.IGNORECASE):
+ if not re.search(r"\bFree Software Foundation\b", stdout):
return None
version_str = re.match(r".+\(.+\) (.+)", stdout)
@@ -75,7 +75,7 @@ def libc_from_dynamic_linker(dynamic_linker: str) -> Optional["spack.spec.Spec"]
return spec
except Exception:
return None
- elif re.search(r"\b(?:gnu|glibc|arm)\b", stdout, re.IGNORECASE):
+ elif re.search(r"\bFree Software Foundation\b", stdout):
# output is like "ld.so (...) stable release version 2.33."
match = re.search(r"version (\d+\.\d+(?:\.\d+)?)", stdout)
if not match: