pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk On Linux systems record the glibc version in the bu...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c4bb7c04fb32
branches: trunk
changeset: 575710:c4bb7c04fb32
user: sbd <sbd%pkgsrc.org@localhost>
date: Thu May 20 07:57:22 2010 +0000
description:
On Linux systems record the glibc version in the build information.
OKed by wiz@
diffstat:
mk/bsd.pkg.mk | 6 +++++-
mk/platform/Linux.mk | 9 ++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
diffs (40 lines):
diff -r 7084d2ee1fde -r c4bb7c04fb32 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Thu May 20 07:49:21 2010 +0000
+++ b/mk/bsd.pkg.mk Thu May 20 07:57:22 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1971 2010/05/19 09:12:15 sbd Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1972 2010/05/20 07:57:22 sbd Exp $
#
# This file is in the public domain.
#
@@ -530,6 +530,10 @@
_BUILD_DEFS+= BUILTIN_PKGS
.endif
+.if defined(GLIBC_VERSION)
+_BUILD_DEFS+= GLIBC_VERSION
+.endif # GLIBC_VERSION
+
.PHONY: all
.if !target(all)
all: ${_PKGSRC_BUILD_TARGETS}
diff -r 7084d2ee1fde -r c4bb7c04fb32 mk/platform/Linux.mk
--- a/mk/platform/Linux.mk Thu May 20 07:49:21 2010 +0000
+++ b/mk/platform/Linux.mk Thu May 20 07:57:22 2010 +0000
@@ -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 @@
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
Home |
Main Index |
Thread Index |
Old Index