summaryrefslogtreecommitdiff
path: root/mk/platform
diff options
context:
space:
mode:
authorsbd <sbd>2010-05-20 07:57:22 +0000
committersbd <sbd>2010-05-20 07:57:22 +0000
commitf77f7ca1af9da8f70f5b953728037388bc890f33 (patch)
tree64e4ed2200549a2bff0d7cb624f86262a9489f43 /mk/platform
parentc920fe34896c8f613d6ed29d156f86bc9aa0fa1b (diff)
downloadpkgsrc-f77f7ca1af9da8f70f5b953728037388bc890f33.tar.gz
On Linux systems record the glibc version in the build information.
OKed by wiz@
Diffstat (limited to 'mk/platform')
-rw-r--r--mk/platform/Linux.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/mk/platform/Linux.mk b/mk/platform/Linux.mk
index 2afe063a1b3..133ad115622 100644
--- a/mk/platform/Linux.mk
+++ b/mk/platform/Linux.mk
@@ -1,4 +1,4 @@
-# $NetBSD: Linux.mk,v 1.38 2010/05/16 06:59:26 sbd Exp $
+# $NetBSD: Linux.mk,v 1.39 2010/05/20 07:57:23 sbd Exp $
#
# Variable definitions for the Linux operating system.
@@ -111,3 +111,10 @@ _OPSYS_CAN_CHECK_SHLIBS= yes # use readelf in check/bsd.check-vars.mk
ABI?= 64
LIBABISUFFIX?= 64
.endif
+
+## Use _CMD so the command only gets run when needed!
+.if exists(/lib/libc.so.6)
+_GLIBC_VERSION_CMD= /lib/libc.so.6 --version | \
+ sed -ne's/^GNU C.*version \(.*\),.*$$/\1/p'
+GLIBC_VERSION= ${_GLIBC_VERSION_CMD:sh}
+.endif