diff options
-rw-r--r-- | pkgs/development/libraries/glibc/2.17/common.nix | 12 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc/2.17/default.nix | 6 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 6 |
3 files changed, 19 insertions, 5 deletions
diff --git a/pkgs/development/libraries/glibc/2.17/common.nix b/pkgs/development/libraries/glibc/2.17/common.nix index e0588a6275d6..66251e0fc49f 100644 --- a/pkgs/development/libraries/glibc/2.17/common.nix +++ b/pkgs/development/libraries/glibc/2.17/common.nix @@ -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 diff --git a/pkgs/development/libraries/glibc/2.17/default.nix b/pkgs/development/libraries/glibc/2.17/default.nix index b6d91c932db8..52a94bd0a0d5 100644 --- a/pkgs/development/libraries/glibc/2.17/default.nix +++ b/pkgs/development/libraries/glibc/2.17/default.nix @@ -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; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 99081dbee89b..0e802b8b727e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { |