summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorjdomke <28772296+jdomke@users.noreply.github.com>2024-05-02 22:59:29 +0900
committerGitHub <noreply@github.com>2024-05-02 15:59:29 +0200
commit97dc353cb06da0114863b2bb8c8e2792eac73432 (patch)
tree59e46a072bdc73d27eadf5fffad0d517228bfc5c /lib
parentbeebe2c9d3e846cfe721fdf425632f57d833a79c (diff)
downloadspack-97dc353cb06da0114863b2bb8c8e2792eac73432.tar.gz
spack-97dc353cb06da0114863b2bb8c8e2792eac73432.tar.bz2
spack-97dc353cb06da0114863b2bb8c8e2792eac73432.tar.xz
spack-97dc353cb06da0114863b2bb8c8e2792eac73432.zip
libc: detect ARM flavor (#43959)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/util/libc.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/spack/util/libc.py b/lib/spack/spack/util/libc.py
index a0bdfdd76f..bef8859e3d 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("gnu|glibc", stdout, re.IGNORECASE):
+ if not re.search(r"\b(?:gnu|glibc|arm)\b", stdout, re.IGNORECASE):
return None
version_str = re.match(r".+\(.+\) (.+)", stdout)
@@ -75,8 +75,8 @@ def libc_from_dynamic_linker(dynamic_linker: str) -> Optional["spack.spec.Spec"]
return spec
except Exception:
return None
- elif re.search("gnu|glibc", stdout, re.IGNORECASE):
- # output is like "ld.so (...) stable release version 2.33." write a regex for it
+ elif re.search(r"\b(?:gnu|glibc|arm)\b", stdout, re.IGNORECASE):
+ # output is like "ld.so (...) stable release version 2.33."
match = re.search(r"version (\d+\.\d+(?:\.\d+)?)", stdout)
if not match:
return None