3
0
Fork 0
forked from mirrors/nixpkgs

glibc 2.17: Reinstate support for cross-GNU builds.

This commit is contained in:
Ludovic Courtès 2013-03-21 13:08:19 +01:00
parent 8993677607
commit d69e680035
2 changed files with 20 additions and 10 deletions

View file

@ -3,7 +3,7 @@
cross:
{ name, fetchurl, stdenv, installLocales ? false
{ name, fetchurl, fetchgit ? null, stdenv, installLocales ? false
, gccCross ? null, kernelHeaders ? null
, machHeaders ? null, hurdHeaders ? null, libpthreadHeaders ? null
, mig ? null
@ -118,16 +118,26 @@ 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" ]) //
// (removeAttrs args [ "gccCross" "fetchurl" "fetchgit" ]) //
{
name = name + "-${version}" +
stdenv.lib.optionalString (cross != null) "-${cross.config}";
src = fetchurl {
url = "mirror://gnu/glibc/glibc-${version}.tar.gz";
sha256 = "0ym3zk9ii64279wgw7pw9xkbxczy2ci7ka6mnfs05rhlainhicm3";
};
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 = "cecec9dd5a2bafc875c56b058b6d7628a22b250b53747513dec304f31ffdb82d";
rev = "d3cdecf18e6550b0984a42b43ed48c5fb26501e1";
}
else fetchurl {
url = "mirror://gnu/glibc/glibc-${version}.tar.gz";
sha256 = "0ym3zk9ii64279wgw7pw9xkbxczy2ci7ka6mnfs05rhlainhicm3";
};
# Remove absolute paths from `configure' & co.; build out-of-tree.
preConfigure = ''

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, kernelHeaders
{ stdenv, fetchurl, fetchgit, kernelHeaders
, machHeaders ? null, hurdHeaders ? null, libpthreadHeaders ? null
, mig ? null
, installLocales ? true
@ -18,8 +18,8 @@ in
+ stdenv.lib.optionalString (hurdHeaders != null) "-hurd"
+ stdenv.lib.optionalString debugSymbols "-debug";
inherit fetchurl stdenv kernelHeaders installLocales profilingLibraries
gccCross;
inherit fetchurl fetchgit stdenv kernelHeaders installLocales
profilingLibraries gccCross;
builder = ./builder.sh;
@ -56,7 +56,7 @@ in
(if hurdHeaders != null
then rec {
inherit machHeaders hurdHeaders libpthreadHeaders mig;
inherit machHeaders hurdHeaders libpthreadHeaders mig fetchgit;
propagatedBuildInputs = [ machHeaders hurdHeaders libpthreadHeaders ];