GNU libc: Backport Hurd-related changes from glibc 2.12 in trunk.
svn path=/nixpkgs/branches/stdenv-updates/; revision=32374
This commit is contained in:
parent
0811db080e
commit
5481e67e23
@ -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 { }))
|
||||
|
@ -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
|
||||
|
@ -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 { }))
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user