glibc/hurd: Update to latest Git; add dependency on pthread headers.

svn path=/nixpkgs/trunk/; revision=30172
This commit is contained in:
Ludovic Courtès 2011-11-01 22:10:45 +00:00
parent 3239966f9d
commit 08b5baee9a
4 changed files with 46 additions and 16 deletions

View File

@ -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, hurdLibpthreadHeaders ? null
, mig ? null, fetchgit ? null
, profilingLibraries ? false, meta
, preConfigure ? "", ... }@args :
let
# For GNU/Hurd, see below.
version = if hurdHeaders != null then "20110623" else "2.12.2";
version = if hurdHeaders != null then "20111025" else "2.12.2";
needsPortsNative = stdenv.isMips || stdenv.isArm;
needsPortsCross = cross.arch == "mips" || cross.arch == "arm";
@ -31,6 +32,7 @@ assert (cross != null) -> (gccCross != null);
assert (mig != null) -> (machHeaders != null);
assert (machHeaders != null) -> (hurdHeaders != null);
assert (hurdHeaders != null) -> (hurdLibpthreadHeaders != null);
assert (hurdHeaders != null) -> (fetchgit != null);
stdenv.mkDerivation ({
@ -141,8 +143,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 = "39ea53f318376cbd33e06ec23f4a393fc0801ea3aa87286b30943aa7ef7604cd";
rev = "77a94de8d3490e73a71efc0b981356d5acb7a28a";
sha256 = "3fb3dd7030a4b6d3e144fa94c32a0c4f46f17f94e2dfbc6bef41cfc3198725ca";
rev = "d740cf9d201dc9ecb0335b0a585828dea9cce793";
}
else fetchurl {
url = "mirror://gnu/glibc/glibc-${version}.tar.bz2";
@ -198,11 +200,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:${hurdLibpthreadHeaders}/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 { }))

View File

@ -1,5 +1,6 @@
{ stdenv, fetchurl, kernelHeaders
, machHeaders ? null, hurdHeaders ? null, mig ? null, fetchgit ? null
, machHeaders ? null, hurdHeaders ? null, hurdLibpthreadHeaders ? null
, mig ? null, fetchgit ? null
, installLocales ? true
, profilingLibraries ? false
, gccCross ? null
@ -40,9 +41,9 @@ in
(if hurdHeaders != null
then rec {
inherit machHeaders hurdHeaders mig fetchgit;
inherit machHeaders hurdHeaders hurdLibpthreadHeaders mig fetchgit;
propagatedBuildInputs = [ machHeaders hurdHeaders ];
propagatedBuildInputs = [ machHeaders hurdHeaders hurdLibpthreadHeaders ];
passthru = {
# When building GCC itself `propagatedBuildInputs' above is not

View File

@ -1,27 +1,29 @@
{ fetchgit, stdenv, autoconf, automake, libtool
, machHeaders, hurdHeaders, hurd
, machHeaders, hurdHeaders, hurd, headersOnly ? false
, cross ? null, gccCross ? null, glibcCross ? null }:
assert (cross != null) -> (gccCross != null) && (glibcCross != null);
assert (!headersOnly) -> (hurd != null);
let
date = "20100512";
date = "20111020";
# Use the `tschwinge/Peter_Herbolzheimer' branch as prescribed in
# <http://www.gnu.org/software/hurd/hurd/building/cross-compiling.html>.
rev = "c4bb52770f0b6703bef76c5abdd08663b46b4dc9";
rev = "a7b82c3302bf9c47176648eb802a61ae2d9a16f5";
in
stdenv.mkDerivation ({
name = "libpthread-hurd-${date}";
name = "libpthread-hurd-${if headersOnly then "headers-" else ""}${date}";
src = fetchgit {
url = "git://git.sv.gnu.org/hurd/libpthread.git";
sha256 = "1wya9kfmqgn04l995a25p4hxfwddjahfmhdzljb4cribw0bqdizg";
sha256 = "e8300762914d927c0da4168341a5982a1057613e1af363ee68942087b2570b3d";
inherit rev;
};
buildNativeInputs = [ autoconf automake libtool ];
buildInputs = [ machHeaders hurdHeaders hurd ]
buildInputs = [ machHeaders hurdHeaders ]
++ stdenv.lib.optional (!headersOnly) hurd
++ stdenv.lib.optional (gccCross != null) gccCross;
preConfigure = "autoreconf -vfi";
@ -37,6 +39,20 @@ stdenv.mkDerivation ({
//
(if headersOnly
then {
configureFlags =
[ "--build=i586-pc-gnu"
"ac_cv_lib_ihash_hurd_ihash_create=yes"
];
buildPhase = ":";
installPhase = "make install-data-local-headers";
}
else { })
//
(if cross != null
then {
crossConfig = cross.config;

View File

@ -3433,7 +3433,9 @@ let
//
(if crossGNU
then { inherit machHeaders hurdHeaders mig fetchgit; }
then {
inherit machHeaders hurdHeaders hurdLibpthreadHeaders mig fetchgit;
}
else { }))));
glibcCross = glibc212Cross;
@ -5221,6 +5223,11 @@ let
hurdPartedCross = null;
};
hurdLibpthreadHeaders = callPackage ../os-specific/gnu/libpthread {
headersOnly = true;
hurd = null;
};
hurdLibpthreadCross = forceBuildDrv(import ../os-specific/gnu/libpthread {
inherit fetchgit stdenv autoconf automake libtool
machHeaders hurdHeaders glibcCross;