pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/platform mk/platform/Linux.mk: Fix glibc detection ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/36b6418d3524
branches:  trunk
changeset: 422319:36b6418d3524
user:      nia <nia%pkgsrc.org@localhost>
date:      Fri Jan 24 12:32:21 2020 +0000

description:
mk/platform/Linux.mk: Fix glibc detection on Debian.

Problem identified and patch reviewed/tested by gutteridge, thanks

diffstat:

 mk/platform/Linux.mk |  13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 4bd1d5f80a01 -r 36b6418d3524 mk/platform/Linux.mk
--- a/mk/platform/Linux.mk      Fri Jan 24 12:09:31 2020 +0000
+++ b/mk/platform/Linux.mk      Fri Jan 24 12:32:21 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Linux.mk,v 1.80 2019/01/24 18:40:56 tnn Exp $
+# $NetBSD: Linux.mk,v 1.81 2020/01/24 12:32:21 nia Exp $
 #
 # Variable definitions for the Linux operating system.
 
@@ -167,12 +167,17 @@
 CWRAPPERS_APPEND.ld+=  -m elf_i386
 .endif
 
+_GLIBC_PATHS+= /lib${LIBABISUFFIX}/libc.so.6
+_GLIBC_PATHS+= /lib/${MACHINE_ARCH}-linux-gnu/libc.so.6
+
+.for _glibc_path in ${_GLIBC_PATHS}
+.  if exists(${_glibc_path})
 ## Use _CMD so the command only gets run when needed!
-.if exists(/lib${LIBABISUFFIX}/libc.so.6)
-_GLIBC_VERSION_CMD=    /lib${LIBABISUFFIX}/libc.so.6 --version | \
+_GLIBC_VERSION_CMD=    ${_glibc_path} --version | \
                                sed -ne's/^GNU C.*version \(.*\),.*$$/\1/p'
 GLIBC_VERSION=         ${_GLIBC_VERSION_CMD:sh}
-.endif
+.  endif
+.endfor
 
 # If this is defined pass it to the make process. 
 .if defined(NOGCCERROR)



Home | Main Index | Thread Index | Old Index