Skip to content

Commit

Permalink
glibc: detect from "Free Software Foundation" not "gnu" (#44154)
Browse files Browse the repository at this point in the history
which should be more generic
  • Loading branch information
haampie committed May 13, 2024
1 parent eaf330f commit 4f11165
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/spack/spack/util/libc.py
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 4f11165

Please sign in to comment.