1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

Adding a glibc variant with the memusage program

This commit is contained in:
Lluís Batlle i Rossell 2013-08-20 10:15:40 +02:00
parent e72c2ddee4
commit 2fbbe2c1a9
3 changed files with 19 additions and 5 deletions

View file

@ -8,6 +8,7 @@ cross:
, machHeaders ? null, hurdHeaders ? null, libpthreadHeaders ? null
, mig ? null
, profilingLibraries ? false, meta
, withGd ? false, gd ? null, libpng ? null
, preConfigure ? "", ... }@args:
let
@ -103,12 +104,13 @@ stdenv.mkDerivation ({
# To avoid linking with -lgcc_s (dynamic link)
# so the glibc does not depend on its compiler store path
"libc_cv_as_needed=no"
];
] ++ stdenv.lib.optional withGd "--with-gd";
installFlags = [ "sysconfdir=$(out)/etc" ];
buildInputs = stdenv.lib.optionals (cross != null) [ gccCross ]
++ stdenv.lib.optional (mig != null) mig;
++ stdenv.lib.optional (mig != null) mig
++ stdenv.lib.optionals withGd [ gd libpng ];
# Needed to install share/zoneinfo/zone.tab. Set to impure /bin/sh to
# prevent a retained dependency on the bootstrap tools in the stdenv-linux
@ -125,7 +127,7 @@ stdenv.mkDerivation ({
# Remove the `gccCross' attribute so that the *native* glibc store path
# doesn't depend on whether `gccCross' is null or not.
// (removeAttrs args [ "gccCross" "fetchurl" "fetchgit" ]) //
// (removeAttrs args [ "gccCross" "fetchurl" "fetchgit" "withGd" "gd" "libpng" ]) //
{
name = name + "-${version}" +
@ -188,6 +190,10 @@ stdenv.mkDerivation ({
} // meta;
}
// stdenv.lib.optionalAttrs withGd {
preBuild = "unset NIX_DONT_SET_RPATH";
}
// stdenv.lib.optionalAttrs (hurdHeaders != null) {
# Work around the fact that the configure snippet that looks for
# <hurd/version.h> does not honor `--with-headers=$sysheaders' and that

View file

@ -5,6 +5,7 @@
, profilingLibraries ? false
, gccCross ? null
, debugSymbols ? false
, withGd ? false, gd ? null, libpng ? null
}:
assert stdenv.gcc.gcc != null;
@ -16,10 +17,11 @@ in
build cross ({
name = "glibc"
+ stdenv.lib.optionalString (hurdHeaders != null) "-hurd"
+ stdenv.lib.optionalString debugSymbols "-debug";
+ stdenv.lib.optionalString debugSymbols "-debug"
+ stdenv.lib.optionalString withGd "-gd";
inherit fetchurl fetchgit stdenv kernelHeaders installLocales
profilingLibraries gccCross;
profilingLibraries gccCross withGd gd libpng;
builder = ./builder.sh;

View file

@ -4099,6 +4099,12 @@ let
gccCross = null;
};
glibc_memusage = callPackage ../development/libraries/glibc/2.17 {
kernelHeaders = linuxHeaders;
installLocales = false;
withGd = true;
};
glibc217Cross = forceNativeDrv (makeOverridable (import ../development/libraries/glibc/2.17)
(let crossGNU = crossSystem != null && crossSystem.config == "i586-pc-gnu";
in {