diff options
author | sbd <sbd@pkgsrc.org> | 2010-05-20 07:57:22 +0000 |
---|---|---|
committer | sbd <sbd@pkgsrc.org> | 2010-05-20 07:57:22 +0000 |
commit | c7928d7023b9b0d0829a26d919882627fa0efda4 (patch) | |
tree | 64e4ed2200549a2bff0d7cb624f86262a9489f43 | |
parent | 561d23451db62dc71c2aa4276c4126b5e3d918c8 (diff) | |
download | pkgsrc-c7928d7023b9b0d0829a26d919882627fa0efda4.tar.gz |
On Linux systems record the glibc version in the build information.
OKed by wiz@
-rw-r--r-- | mk/bsd.pkg.mk | 6 | ||||
-rw-r--r-- | mk/platform/Linux.mk | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index d70fff3d588..065ce0aaf4a 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -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 @@ BUILTIN_PKGS+= ${BUILTIN_PKG.${_pkg_}} _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 --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 |