diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-02-17 22:12:40 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-02-17 22:12:40 +0000 |
commit | 5481e67e2349a2cf159d4369b07d6fd11098d425 (patch) | |
tree | 6648e3b10bf6276c0a5e720e8105514f787a6009 /pkgs/development/libraries/glibc | |
parent | 0811db080e8ee73d1df01bef19fb6fb1613afe8b (diff) | |
download | nixlib-5481e67e2349a2cf159d4369b07d6fd11098d425.tar nixlib-5481e67e2349a2cf159d4369b07d6fd11098d425.tar.gz nixlib-5481e67e2349a2cf159d4369b07d6fd11098d425.tar.bz2 nixlib-5481e67e2349a2cf159d4369b07d6fd11098d425.tar.lz nixlib-5481e67e2349a2cf159d4369b07d6fd11098d425.tar.xz nixlib-5481e67e2349a2cf159d4369b07d6fd11098d425.tar.zst nixlib-5481e67e2349a2cf159d4369b07d6fd11098d425.zip |
GNU libc: Backport Hurd-related changes from glibc 2.12 in trunk.
svn path=/nixpkgs/branches/stdenv-updates/; revision=32374
Diffstat (limited to 'pkgs/development/libraries/glibc')
-rw-r--r-- | pkgs/development/libraries/glibc/2.13/common.nix | 18 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc/2.13/default.nix | 22 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc/2.14/common.nix | 18 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc/2.14/default.nix | 22 |
4 files changed, 60 insertions, 20 deletions
diff --git a/pkgs/development/libraries/glibc/2.13/common.nix b/pkgs/development/libraries/glibc/2.13/common.nix index d63e7e99e480..1c8f142553fa 100644 --- a/pkgs/development/libraries/glibc/2.13/common.nix +++ b/pkgs/development/libraries/glibc/2.13/common.nix @@ -5,13 +5,14 @@ cross : { name, fetchurl, stdenv, installLocales ? false , gccCross ? null, kernelHeaders ? null -, machHeaders ? null, hurdHeaders ? null, mig ? null, fetchgit ? null +, machHeaders ? null, hurdHeaders ? null, libpthreadHeaders ? null +, mig ? null, fetchgit ? null , profilingLibraries ? false, meta , preConfigure ? "", ... }@args : let # For GNU/Hurd, see below. - version = if hurdHeaders != null then "20100512" else "2.13"; + version = if hurdHeaders != null then "20111025" else "2.13"; needsPortsNative = stdenv.isMips || stdenv.isArm; needsPortsCross = cross.arch == "mips" || cross.arch == "arm"; @@ -30,6 +31,7 @@ assert (cross != null) -> (gccCross != null); assert (mig != null) -> (machHeaders != null); assert (machHeaders != null) -> (hurdHeaders != null); +assert (hurdHeaders != null) -> (libpthreadHeaders != null); assert (hurdHeaders != null) -> (fetchgit != null); stdenv.mkDerivation ({ @@ -146,8 +148,8 @@ stdenv.mkDerivation ({ # maintained by the Hurd folks, `tschwinge/Roger_Whittaker' branch. # See <http://www.gnu.org/software/hurd/source_repositories/glibc.html>. url = "git://git.sv.gnu.org/hurd/glibc.git"; - sha256 = "f3590a54a9d897d121f91113949edbaaf3e30cdeacbb8d0a44de7b6564f6643e"; - rev = "df4c3faf0ccc848b5a8086c222bdb42679a9798f"; + sha256 = "3fb3dd7030a4b6d3e144fa94c32a0c4f46f17f94e2dfbc6bef41cfc3198725ca"; + rev = "d740cf9d201dc9ecb0335b0a585828dea9cce793"; } else fetchurl { url = "mirror://gnu/glibc/glibc-${version}.tar.bz2"; @@ -203,11 +205,15 @@ stdenv.mkDerivation ({ then { # Work around the fact that the configure snippet that looks for # <hurd/version.h> does not honor `--with-headers=$sysheaders' and that - # glibc expects both Mach and Hurd headers to be in the same place. - CPATH = "${hurdHeaders}/include:${machHeaders}/include"; + # glibc expects Mach, Hurd, and pthread headers to be in the same place. + CPATH = "${hurdHeaders}/include:${machHeaders}/include:${libpthreadHeaders}/include"; # `fetchgit' is a function and thus should not be passed to the # `derivation' primitive. fetchgit = null; + + # Install NSS stuff in the right place. + # XXX: This will be needed for all new glibcs and isn't Hurd-specific. + makeFlags = ''vardbdir="$out/var/db"''; } else { })) diff --git a/pkgs/development/libraries/glibc/2.13/default.nix b/pkgs/development/libraries/glibc/2.13/default.nix index 95778b50b70b..1b4e43b1013a 100644 --- a/pkgs/development/libraries/glibc/2.13/default.nix +++ b/pkgs/development/libraries/glibc/2.13/default.nix @@ -1,8 +1,10 @@ { stdenv, fetchurl, kernelHeaders -, machHeaders ? null, hurdHeaders ? null, mig ? null, fetchgit ? null +, machHeaders ? null, hurdHeaders ? null, libpthreadHeaders ? null +, mig ? null, fetchgit ? null , installLocales ? true , profilingLibraries ? false , gccCross ? null +, debugSymbols ? false }: assert stdenv.gcc.gcc != null; @@ -12,7 +14,7 @@ let cross = if gccCross != null then gccCross.target else null; in build cross ({ - name = "glibc"; + name = "glibc${if debugSymbols then "-debug" else ""}"; inherit fetchurl stdenv kernelHeaders installLocales profilingLibraries gccCross; @@ -38,11 +40,23 @@ in // + (if debugSymbols + then { + # Build with debugging symbols, but leave optimizations on and don't + # attempt to keep the build tree. + dontStrip = true; + dontCrossStrip = true; + NIX_STRIP_DEBUG = 0; + } + else {}) + + // + (if hurdHeaders != null then rec { - inherit machHeaders hurdHeaders mig fetchgit; + inherit machHeaders hurdHeaders libpthreadHeaders mig fetchgit; - propagatedBuildInputs = [ machHeaders hurdHeaders ]; + propagatedBuildInputs = [ machHeaders hurdHeaders libpthreadHeaders ]; passthru = { # When building GCC itself `propagatedBuildInputs' above is not diff --git a/pkgs/development/libraries/glibc/2.14/common.nix b/pkgs/development/libraries/glibc/2.14/common.nix index e24089fd1920..488503d90120 100644 --- a/pkgs/development/libraries/glibc/2.14/common.nix +++ b/pkgs/development/libraries/glibc/2.14/common.nix @@ -5,13 +5,14 @@ cross : { name, fetchurl, stdenv, installLocales ? false , gccCross ? null, kernelHeaders ? null -, machHeaders ? null, hurdHeaders ? null, mig ? null, fetchgit ? null +, machHeaders ? null, hurdHeaders ? null, libpthreadHeaders ? null +, mig ? null, fetchgit ? null , profilingLibraries ? false, meta , preConfigure ? "", ... }@args : let # For GNU/Hurd, see below. - version = if hurdHeaders != null then "20100512" else "2.14.1"; + version = if hurdHeaders != null then "20111025" else "2.14.1"; needsPortsNative = stdenv.isMips || stdenv.isArm; needsPortsCross = cross.arch == "mips" || cross.arch == "arm"; @@ -30,6 +31,7 @@ assert (cross != null) -> (gccCross != null); assert (mig != null) -> (machHeaders != null); assert (machHeaders != null) -> (hurdHeaders != null); +assert (hurdHeaders != null) -> (libpthreadHeaders != null); assert (hurdHeaders != null) -> (fetchgit != null); stdenv.mkDerivation ({ @@ -146,8 +148,8 @@ stdenv.mkDerivation ({ # maintained by the Hurd folks, `tschwinge/Roger_Whittaker' branch. # See <http://www.gnu.org/software/hurd/source_repositories/glibc.html>. url = "git://git.sv.gnu.org/hurd/glibc.git"; - sha256 = "f3590a54a9d897d121f91113949edbaaf3e30cdeacbb8d0a44de7b6564f6643e"; - rev = "df4c3faf0ccc848b5a8086c222bdb42679a9798f"; + sha256 = "3fb3dd7030a4b6d3e144fa94c32a0c4f46f17f94e2dfbc6bef41cfc3198725ca"; + rev = "d740cf9d201dc9ecb0335b0a585828dea9cce793"; } else fetchurl { url = "mirror://gnu/glibc/glibc-${version}.tar.bz2"; @@ -203,11 +205,15 @@ stdenv.mkDerivation ({ then { # Work around the fact that the configure snippet that looks for # <hurd/version.h> does not honor `--with-headers=$sysheaders' and that - # glibc expects both Mach and Hurd headers to be in the same place. - CPATH = "${hurdHeaders}/include:${machHeaders}/include"; + # glibc expects Mach, Hurd, and pthread headers to be in the same place. + CPATH = "${hurdHeaders}/include:${machHeaders}/include:${libpthreadHeaders}/include"; # `fetchgit' is a function and thus should not be passed to the # `derivation' primitive. fetchgit = null; + + # Install NSS stuff in the right place. + # XXX: This will be needed for all new glibcs and isn't Hurd-specific. + makeFlags = ''vardbdir="$out/var/db"''; } else { })) diff --git a/pkgs/development/libraries/glibc/2.14/default.nix b/pkgs/development/libraries/glibc/2.14/default.nix index 95778b50b70b..1b4e43b1013a 100644 --- a/pkgs/development/libraries/glibc/2.14/default.nix +++ b/pkgs/development/libraries/glibc/2.14/default.nix @@ -1,8 +1,10 @@ { stdenv, fetchurl, kernelHeaders -, machHeaders ? null, hurdHeaders ? null, mig ? null, fetchgit ? null +, machHeaders ? null, hurdHeaders ? null, libpthreadHeaders ? null +, mig ? null, fetchgit ? null , installLocales ? true , profilingLibraries ? false , gccCross ? null +, debugSymbols ? false }: assert stdenv.gcc.gcc != null; @@ -12,7 +14,7 @@ let cross = if gccCross != null then gccCross.target else null; in build cross ({ - name = "glibc"; + name = "glibc${if debugSymbols then "-debug" else ""}"; inherit fetchurl stdenv kernelHeaders installLocales profilingLibraries gccCross; @@ -38,11 +40,23 @@ in // + (if debugSymbols + then { + # Build with debugging symbols, but leave optimizations on and don't + # attempt to keep the build tree. + dontStrip = true; + dontCrossStrip = true; + NIX_STRIP_DEBUG = 0; + } + else {}) + + // + (if hurdHeaders != null then rec { - inherit machHeaders hurdHeaders mig fetchgit; + inherit machHeaders hurdHeaders libpthreadHeaders mig fetchgit; - propagatedBuildInputs = [ machHeaders hurdHeaders ]; + propagatedBuildInputs = [ machHeaders hurdHeaders libpthreadHeaders ]; passthru = { # When building GCC itself `propagatedBuildInputs' above is not |