glibc: Get the Hurd-specific glibc branch.

svn path=/nixpkgs/trunk/; revision=21761
This commit is contained in:
Ludovic Courtès 2010-05-12 23:54:20 +00:00
parent a07de1d9b1
commit 7a34b3a7a9
3 changed files with 40 additions and 16 deletions

View File

@ -5,14 +5,21 @@ cross :
{ name, fetchurl, stdenv, installLocales ? false { name, fetchurl, stdenv, installLocales ? false
, gccCross ? null, kernelHeaders ? null , gccCross ? null, kernelHeaders ? null
, machHeaders ? null, hurdHeaders ? null, mig ? null , machHeaders ? null, hurdHeaders ? null, mig ? null, fetchgit ? null
, profilingLibraries ? false, meta , profilingLibraries ? false, meta
, preConfigure ? "", ... }@args : , preConfigure ? "", ... }@args :
let version = "2.11.1"; in let
rev = "df4c3faf0ccc848b5a8086c222bdb42679a9798f";
version = if hurdHeaders != null then "0.0-pre" + rev else "2.11.1";
in
assert (cross != null) -> (gccCross != null); assert (cross != null) -> (gccCross != null);
assert (mig != null) -> (machHeaders != null);
assert (machHeaders != null) -> (hurdHeaders != null);
assert (hurdHeaders != null) -> (fetchgit != null);
stdenv.mkDerivation ({ stdenv.mkDerivation ({
inherit kernelHeaders installLocales; inherit kernelHeaders installLocales;
@ -21,7 +28,8 @@ stdenv.mkDerivation ({
inherit (stdenv) is64bit; inherit (stdenv) is64bit;
patches = [ patches =
stdenv.lib.optional (fetchgit == null)
/* Fix for NIXPKGS-79: when doing host name lookups, when /* Fix for NIXPKGS-79: when doing host name lookups, when
nsswitch.conf contains a line like nsswitch.conf contains a line like
@ -45,6 +53,7 @@ stdenv.mkDerivation ({
failure to find mdns4_minimal. */ failure to find mdns4_minimal. */
./nss-skip-unavail.patch ./nss-skip-unavail.patch
++ [
/* Make it possible to override the locale-archive in NixOS. */ /* Make it possible to override the locale-archive in NixOS. */
./locale-override.patch ./locale-override.patch
@ -53,10 +62,11 @@ stdenv.mkDerivation ({
/* Make sure `nscd' et al. are linked against `libssp'. */ /* Make sure `nscd' et al. are linked against `libssp'. */
./stack-protector-link.patch ./stack-protector-link.patch
]
++ stdenv.lib.optional (fetchgit == null)
/* MOD_NANO definition, for ntp (taken from glibc upstream) */ /* MOD_NANO definition, for ntp (taken from glibc upstream) */
./mod_nano.patch ./mod_nano.patch;
];
configureFlags = [ configureFlags = [
"-C" "-C"
@ -100,7 +110,17 @@ stdenv.mkDerivation ({
name = name + "-${version}" + name = name + "-${version}" +
stdenv.lib.optionalString (cross != null) "-${cross.config}"; stdenv.lib.optionalString (cross != null) "-${cross.config}";
src = fetchurl { src =
if hurdHeaders != null
then fetchgit {
# Shamefully the "official" glibc won't build on GNU, so use the one
# 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";
inherit rev;
}
else fetchurl {
url = "mirror://gnu/glibc/glibc-${version}.tar.bz2"; url = "mirror://gnu/glibc/glibc-${version}.tar.bz2";
sha256 = "18azb6518ryqhkfmddr25p0h1s2msrmx7dblij58sjlnzh61vq34"; sha256 = "18azb6518ryqhkfmddr25p0h1s2msrmx7dblij58sjlnzh61vq34";
}; };
@ -155,11 +175,15 @@ stdenv.mkDerivation ({
// //
(if (cross != null && cross.config == "i586-pc-gnu") (if hurdHeaders != null
then { then {
# Work around the fact that the configure snippet that looks for # Work around the fact that the configure snippet that looks for
# <hurd/version.h> does not honor `--with-headers=$sysheaders' and that # <hurd/version.h> does not honor `--with-headers=$sysheaders' and that
# glibc expects both Mach and Hurd headers to be in the same place. # glibc expects both Mach and Hurd headers to be in the same place.
CPATH = "${hurdHeaders}/include:${machHeaders}/include"; CPATH = "${hurdHeaders}/include:${machHeaders}/include";
# `fetchgit' is a function and thus should not be passed to the
# `derivation' primitive.
fetchgit = null;
} }
else { })) else { }))

View File

@ -1,14 +1,11 @@
{ stdenv, fetchurl, kernelHeaders { stdenv, fetchurl, kernelHeaders
, machHeaders ? null, hurdHeaders ? null , machHeaders ? null, hurdHeaders ? null, mig ? null, fetchgit ? null
, installLocales ? true , installLocales ? true
, profilingLibraries ? false , profilingLibraries ? false
, gccCross ? null , gccCross ? null
, mig ? null
}: }:
assert stdenv.gcc.gcc != null; assert stdenv.gcc.gcc != null;
assert (mig != null) -> (machHeaders != null);
assert (machHeaders != null) -> (hurdHeaders != null);
let let
build = import ./common.nix; build = import ./common.nix;
@ -42,7 +39,7 @@ in
// //
(if hurdHeaders != null (if hurdHeaders != null
then { inherit machHeaders hurdHeaders mig; } then { inherit machHeaders hurdHeaders mig fetchgit; }
else { }) else { })
// //

View File

@ -3913,7 +3913,10 @@ let
// //
(if crossGNU (if crossGNU
then { inherit machHeaders hurdHeaders; mig = migCross; } then {
inherit machHeaders hurdHeaders fetchgit;
mig = migCross;
}
else { })))); else { }))));
glibcCross = glibc211Cross; glibcCross = glibc211Cross;