Merge branch 'stdenv-updates' into pi-stdenv-updates

This commit is contained in:
Lluís Batlle i Rossell 2012-12-29 09:05:13 +00:00
commit a8dedfc1d0
15 changed files with 70 additions and 144 deletions

@ -120,7 +120,6 @@ rec {
];
savannah = [
ftp://ftp.twaren.net/Unix/NonGNU/
ftp://mirror.csclub.uwaterloo.ca/nongnu/
ftp://mirror.publicns.net/pub/nongnu/
ftp://savannah.c3sl.ufpr.br/

@ -1,21 +0,0 @@
diff -ru glibc-2.11.2-orig/sysdeps/posix/getaddrinfo.c glibc-2.11.2/sysdeps/posix/getaddrinfo.c
--- glibc-2.11.2-orig/sysdeps/posix/getaddrinfo.c 2010-05-19 22:38:20.000000000 +0200
+++ glibc-2.11.2/sysdeps/posix/getaddrinfo.c 2010-08-05 18:39:54.259556327 +0200
@@ -505,8 +505,6 @@
int no_data = 0;
int no_inet6_data = 0;
service_user *nip = NULL;
- enum nss_status inet6_status = NSS_STATUS_UNAVAIL;
- enum nss_status status = NSS_STATUS_UNAVAIL;
int no_more;
int old_res_options;
@@ -702,6 +700,8 @@
while (!no_more)
{
+ enum nss_status inet6_status = NSS_STATUS_UNAVAIL;
+ enum nss_status status = NSS_STATUS_UNAVAIL;
no_data = 0;
nss_gethostbyname4_r fct4
= __nss_lookup_function (nip, "gethostbyname4_r");

@ -1,72 +0,0 @@
By default, rpcgen(1) looks for cpp(1) from a list of fixed absolute paths
(`/lib/cpp', etc.), which may only be overrided with the `-Y' option. This
patch makes it run any `cpp' command found in $PATH.
--- glibc-2.7/sunrpc/rpc_main.c 2006-11-10 21:54:46.000000000 +0100
+++ glibc-2.7/sunrpc/rpc_main.c 2009-04-22 14:32:10.000000000 +0200
@@ -79,7 +79,7 @@ static const char *cmdname;
static const char *svcclosetime = "120";
static int cppDefined; /* explicit path for C preprocessor */
-static const char *CPP = SUNOS_CPP;
+static const char *CPP = "cpp";
static const char CPPFLAGS[] = "-C";
static char *pathbuf;
static int cpp_pid;
@@ -108,7 +108,6 @@ static char *extendfile (const char *fil
static void open_output (const char *infile, const char *outfile);
static void add_warning (void);
static void clear_args (void);
-static void find_cpp (void);
static void open_input (const char *infile, const char *define);
static int check_nettype (const char *name, const char *list_to_check[]);
static void c_output (const char *infile, const char *define,
@@ -327,31 +326,6 @@ clear_args (void)
argcount = FIXEDARGS;
}
-/* make sure that a CPP exists */
-static void
-find_cpp (void)
-{
- struct stat buf;
-
- if (stat (CPP, &buf) < 0)
- { /* /lib/cpp or explicit cpp does not exist */
- if (cppDefined)
- {
- fprintf (stderr, _ ("cannot find C preprocessor: %s \n"), CPP);
- crash ();
- }
- else
- { /* try the other one */
- CPP = SVR4_CPP;
- if (stat (CPP, &buf) < 0)
- { /* can't find any cpp */
- fputs (_ ("cannot find any C preprocessor (cpp)\n"), stdout);
- crash ();
- }
- }
- }
-}
-
/*
* Open input file with given define for C-preprocessor
*/
@@ -370,7 +344,6 @@ open_input (const char *infile, const ch
switch (cpp_pid)
{
case 0:
- find_cpp ();
putarg (0, CPP);
putarg (1, CPPFLAGS);
addarg (define);
@@ -380,7 +353,7 @@ open_input (const char *infile, const ch
close (1);
dup2 (pd[1], 1);
close (pd[0]);
- execv (arglist[0], (char **) arglist);
+ execvp (arglist[0], (char **) arglist);
perror ("execv");
exit (1);
case -1:

@ -11,24 +11,12 @@ cross:
, preConfigure ? "", ... }@args:
let
version = "2.16.0";
needsPortsNative = stdenv.isMips || stdenv.isArm;
needsPortsCross = cross.arch == "mips" || cross.arch == "arm";
needsPorts =
if stdenv.cross or null != null && hurdHeaders == null then true
else if cross == null then needsPortsNative
else needsPortsCross;
srcPorts = fetchurl {
url = "mirror://gnu/glibc/glibc-ports-${version}.tar.bz2";
sha256 = "0qw4n71rqykl83ybq0c92w1n8afsx079sw3hn5nyib5nw6iphrfm";
};
version = "2.17";
in
assert cross != null -> gccCross != null;
assert mig != null -> machHeaders != null;
assert machHeaders != null -> hurdHeaders != null;
assert hurdHeaders != null -> libpthreadHeaders != null;
@ -44,30 +32,7 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
patches =
[ /* Fix for NIXPKGS-79: when doing host name lookups, when
nsswitch.conf contains a line like
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
don't return an error when mdns4_minimal can't be found. This
is a bug in Glibc: when a service can't be found, NSS should
continue to the next service unless "UNAVAIL=return" is set.
("NOTFOUND=return" refers to the service returning a NOTFOUND
error, not the service itself not being found.) The reason is
that the "status" variable (while initialised to UNAVAIL) is
outside of the loop that iterates over the services, the
"files" service sets status to NOTFOUND. So when the call to
find "mdns4_minimal" fails, "status" will still be NOTFOUND,
and it will return instead of continuing to "dns". Thus, the
line
hosts: mdns4_minimal [NOTFOUND=return] dns mdns4
does work because "status" will contain UNAVAIL after the
failure to find mdns4_minimal. */
./nss-skip-unavail.patch
/* Have rpcgen(1) look for cpp(1) in $PATH. */
[ /* Have rpcgen(1) look for cpp(1) in $PATH. */
./rpcgen-path.patch
/* Allow NixOS and Nix to handle the locale-archive. */
@ -151,7 +116,7 @@ stdenv.mkDerivation ({
src = fetchurl {
url = "mirror://gnu/glibc/glibc-${version}.tar.gz";
sha256 = "0vlz4x6cgz7h54qq4528q526qlhnsjzbsvgc4iizn76cb0bfanx7";
sha256 = "0ym3zk9ii64279wgw7pw9xkbxczy2ci7ka6mnfs05rhlainhicm3";
};
# Remove absolute paths from `configure' & co.; build out-of-tree.
@ -163,8 +128,6 @@ stdenv.mkDerivation ({
sed -i "$i" -e "s^/bin/pwd^$PWD_P^g"
done
${if needsPorts then "tar xvf ${srcPorts}" else ""}
mkdir ../build
cd ../build

@ -0,0 +1,54 @@
diff -ru glibc-2.17-orig/sunrpc/rpc_main.c glibc-2.17/sunrpc/rpc_main.c
--- glibc-2.17-orig/sunrpc/rpc_main.c 2012-12-25 04:02:13.000000000 +0100
+++ glibc-2.17/sunrpc/rpc_main.c 2012-12-29 00:21:04.124698455 +0100
@@ -77,7 +77,7 @@
static const char *svcclosetime = "120";
static int cppDefined; /* explicit path for C preprocessor */
-static const char *CPP = "/lib/cpp";
+static const char *CPP = "cpp";
static const char CPPFLAGS[] = "-C";
static char *pathbuf;
static int cpp_pid;
@@ -106,7 +106,6 @@
static void open_output (const char *infile, const char *outfile);
static void add_warning (void);
static void clear_args (void);
-static void find_cpp (void);
static void open_input (const char *infile, const char *define);
static int check_nettype (const char *name, const char *list_to_check[]);
static void c_output (const char *infile, const char *define,
@@ -318,25 +317,6 @@
argcount = FIXEDARGS;
}
-/* make sure that a CPP exists */
-static void
-find_cpp (void)
-{
- struct stat buf;
-
- if (stat (CPP, &buf) == 0)
- return;
-
- if (cppDefined) /* user specified cpp but it does not exist */
- {
- fprintf (stderr, _ ("cannot find C preprocessor: %s\n"), CPP);
- crash ();
- }
-
- /* fall back to system CPP */
- CPP = "cpp";
-}
-
/*
* Open input file with given define for C-preprocessor
*/
@@ -355,7 +335,6 @@
switch (cpp_pid)
{
case 0:
- find_cpp ();
putarg (0, CPP);
putarg (1, CPPFLAGS);
addarg (define);

@ -3,11 +3,14 @@
assert cross == null -> stdenv.isLinux;
let
version = "3.5.4";
kernelHeadersBaseConfig = if cross == null then
stdenv.platform.kernelHeadersBaseConfig
else
cross.platform.kernelHeadersBaseConfig;
version = "3.7.1";
kernelHeadersBaseConfig =
if cross == null
then stdenv.platform.kernelHeadersBaseConfig
else cross.platform.kernelHeadersBaseConfig;
in
stdenv.mkDerivation {
@ -15,7 +18,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.bz2";
sha256 = "1x2qab82w0wpd82nms68zybygvlphv9yp6nzm93rgs7ck2qjhvlr";
sha256 = "1bb1dxj1i6j7pj926kfy6pz58kw03swyyikl9f3fq3jnswispaj2";
};
targetConfig = if cross != null then cross.config else null;

@ -3661,7 +3661,7 @@ let
glfw = callPackage ../development/libraries/glfw { };
glibc = glibc216;
glibc = glibc217;
glibcCross = glibc213Cross;
@ -3686,7 +3686,7 @@ let
inherit fetchgit;
}));
glibc216 = callPackage ../development/libraries/glibc/2.16 {
glibc217 = callPackage ../development/libraries/glibc/2.17 {
kernelHeaders = linuxHeaders;
installLocales = config.glibc.locales or false;
machHeaders = null;
@ -5725,11 +5725,11 @@ let
libnl = callPackage ../os-specific/linux/libnl { };
linuxHeaders = linuxHeaders35;
linuxHeaders = linuxHeaders37;
linuxConsoleTools = callPackage ../os-specific/linux/consoletools { };
linuxHeaders35 = callPackage ../os-specific/linux/kernel-headers/3.5.nix { };
linuxHeaders37 = callPackage ../os-specific/linux/kernel-headers/3.7.nix { };
linuxHeaders26Cross = forceNativeDrv (import ../os-specific/linux/kernel-headers/2.6.32.nix {
inherit stdenv fetchurl perl;