diff options
author | schmonz <schmonz@pkgsrc.org> | 2021-11-14 14:47:11 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2021-11-14 14:47:11 +0000 |
commit | 5c3c22337a3fa2e88236b8a15b95d7ea797c1f08 (patch) | |
tree | fcaf66bcddc94fcdfcfdd443162aeeb50c16d760 /mk | |
parent | 0d74e1c51f4a919bbc1268c68124ba654a653f7c (diff) | |
download | pkgsrc-5c3c22337a3fa2e88236b8a15b95d7ea797c1f08.tar.gz |
On Linux with glibc, if libc.so.6 isn't executable, glean GLIBC_VERSION
via ldd instead. Noticed when devel/gettext-tools failed PLIST check on
Ubuntu/aarch64 21.10. NFCI for musl libc.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/platform/Linux.mk | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mk/platform/Linux.mk b/mk/platform/Linux.mk index 26d1c307f8a..52ddfcde9c4 100644 --- a/mk/platform/Linux.mk +++ b/mk/platform/Linux.mk @@ -1,4 +1,4 @@ -# $NetBSD: Linux.mk,v 1.86 2021/11/09 12:04:43 nia Exp $ +# $NetBSD: Linux.mk,v 1.87 2021/11/14 14:47:11 schmonz Exp $ # # Variable definitions for the Linux operating system. @@ -174,8 +174,13 @@ CWRAPPERS_APPEND.ld+= -m elf_i386 .for _glibc_path in ${_OPSYS_LIB_DIRS} . if exists(${_glibc_path}/libc.so.6) ## Use _CMD so the command only gets run when needed! -_GLIBC_VERSION_CMD= ${_glibc_path}/libc.so.6 --version | \ - sed -ne's/^GNU C.*version \(.*\)[,.].*$$/\1/p' +_GLIBC_VERSION_CMD= if [ -x ${_glibc_path}/libc.so.6 ]; then \ + ${_glibc_path}/libc.so.6 --version | \ + sed -ne's/^GNU C.*version \(.*\)[,.].*$$/\1/p'; \ + else \ + ldd --version | \ + sed -ne's/^ldd.* \(.*\)$$/\1/p'; \ + fi GLIBC_VERSION= ${_GLIBC_VERSION_CMD:sh} . endif .endfor |