pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/platform On Linux with glibc, if libc.so.6 isn't ex...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e5e69b5fb2e7
branches:  trunk
changeset: 769391:e5e69b5fb2e7
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Sun Nov 14 14:47:11 2021 +0000

description:
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:

 mk/platform/Linux.mk |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (25 lines):

diff -r 1b868cea8ef3 -r e5e69b5fb2e7 mk/platform/Linux.mk
--- a/mk/platform/Linux.mk      Sun Nov 14 14:41:52 2021 +0000
+++ b/mk/platform/Linux.mk      Sun Nov 14 14:47:11 2021 +0000
@@ -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 @@
 .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



Home | Main Index | Thread Index | Old Index