pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk/platform



Module Name:    pkgsrc
Committed By:   schmonz
Date:           Sun Nov 14 14:47:11 UTC 2021

Modified Files:
        pkgsrc/mk/platform: Linux.mk

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 pkgsrc/mk/platform/Linux.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/platform/Linux.mk
diff -u pkgsrc/mk/platform/Linux.mk:1.86 pkgsrc/mk/platform/Linux.mk:1.87
--- pkgsrc/mk/platform/Linux.mk:1.86    Tue Nov  9 12:04:43 2021
+++ pkgsrc/mk/platform/Linux.mk Sun Nov 14 14:47:11 2021
@@ -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



Home | Main Index | Thread Index | Old Index