diff options
author | nia <nia@pkgsrc.org> | 2020-01-24 12:32:21 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2020-01-24 12:32:21 +0000 |
commit | f5c5a4131338cb80ffce2783f22f77430eb23349 (patch) | |
tree | 8a3ce3a6f157f8ab7eca819568191eed2c7bd780 /mk/platform | |
parent | 4b3722afae680dba39e5781d326a26493673d47d (diff) | |
download | pkgsrc-f5c5a4131338cb80ffce2783f22f77430eb23349.tar.gz |
mk/platform/Linux.mk: Fix glibc detection on Debian.
Problem identified and patch reviewed/tested by gutteridge, thanks
Diffstat (limited to 'mk/platform')
-rw-r--r-- | mk/platform/Linux.mk | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/mk/platform/Linux.mk b/mk/platform/Linux.mk index 4738da1f48a..068c92fe4ff 100644 --- a/mk/platform/Linux.mk +++ b/mk/platform/Linux.mk @@ -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 @@ _WRAP_EXTRA_ARGS.LD+= -m elf_i386 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) |