summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-11-08 00:32:12 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-11-08 00:32:12 +0000
commit4b27d2870197b26b7c170caa333944231715d4a3 (patch)
tree6b781861cb96e9ce0660ca0b904ed3dda1cc6905 /pkgs/development
parent6e86ca940f9cb7fdbbf8663bc5c19af45fbc1e17 (diff)
Porting changes from stdenv-updates into this branch. backups/stdenv-updates2@18273
This comes from:
svn diff  ^/nixpkgs/trunk/@18255 ^/nixpkgs/branches/stdenv-updates/ > diff
patch -p0 < diff
and then adding into svn all files new from the patch.

trunk@18255 comes from the last time I updated stdenv-updates from trunk.


svn path=/nixpkgs/stdenv-updates2/; revision=18272
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/gcc-4.3/default.nix12
-rw-r--r--pkgs/development/compilers/ocaml/3.11.1.nix13
-rw-r--r--pkgs/development/compilers/ocaml/cvs.nix31
-rw-r--r--pkgs/development/interpreters/perl-5.10/default.nix30
-rw-r--r--pkgs/development/libraries/eglibc/builder.sh63
-rw-r--r--pkgs/development/libraries/eglibc/default.nix32
-rw-r--r--pkgs/development/libraries/freetype/default.nix8
-rw-r--r--pkgs/development/libraries/glibc-2.9/binutils-2.20.patch42
-rw-r--r--pkgs/development/libraries/glibc-2.9/builder.sh9
-rw-r--r--pkgs/development/libraries/glibc-2.9/default.nix33
-rw-r--r--pkgs/development/libraries/glibc-2.9/info.nix5
-rw-r--r--pkgs/development/libraries/glibc-2.9/locales.nix32
-rw-r--r--pkgs/development/libraries/glibc-2.9/localesbuilder.sh50
-rw-r--r--pkgs/development/libraries/icu/default.nix3
-rw-r--r--pkgs/development/libraries/libxcrypt/default.nix3
-rw-r--r--pkgs/development/libraries/readline/link-against-ncurses.patch18
-rw-r--r--pkgs/development/libraries/readline/readline-patches.nix8
-rw-r--r--pkgs/development/libraries/readline/readline6.nix17
-rw-r--r--pkgs/development/tools/misc/binutils/default.nix12
-rw-r--r--pkgs/development/tools/misc/strace/default.nix2
-rw-r--r--pkgs/development/tools/misc/strace/strace-4.5.18-arm-syscalls.patch162
21 files changed, 541 insertions, 44 deletions
diff --git a/pkgs/development/compilers/gcc-4.3/default.nix b/pkgs/development/compilers/gcc-4.3/default.nix
index aad9f82074466..9823fc8205176 100644
--- a/pkgs/development/compilers/gcc-4.3/default.nix
+++ b/pkgs/development/compilers/gcc-4.3/default.nix
@@ -3,6 +3,7 @@
 , langJava ? false
 , profiledCompiler ? false
 , staticCompiler ? false
+, enableShared ? true
 , texinfo ? null
 , gmp, mpfr
 , bison ? null, flex ? null
@@ -15,7 +16,7 @@ assert langTreelang -> bison != null && flex != null;
 
 with stdenv.lib;
 
-let version = "4.3.3"; in
+let version = "4.3.4"; in
 
 stdenv.mkDerivation ({
   name = "${name}-${version}";
@@ -25,19 +26,19 @@ stdenv.mkDerivation ({
   src =
     optional /*langC*/ true (fetchurl {
       url = "mirror://gcc/releases/gcc-${version}/gcc-core-${version}.tar.bz2";
-      sha256 = "08yksvipnqmqbmif30rwjkg3y0m6ray5r84wa2argv8q0bpz9426";
+      sha256 = "1yk80nwyw8vkpw8d3x7lkg3zrv3ngjqlvj0i8zslzgj7a27q729i";
     }) ++
     optional langCC (fetchurl {
       url = "mirror://gcc/releases/gcc-${version}/gcc-g++-${version}.tar.bz2";
-      sha256 = "12z2zh03yq214qs2cqzh8c64jjfz544nk1lzi9rygjwm8yjsvzm9";
+      sha256 = "0d8pyk5c9zmph25f4fl63vd8vhljj6ildbxpz2hr594g5i6pplpq";
     }) ++
     optional langFortran (fetchurl {
       url = "mirror://gcc/releases/gcc-${version}/gcc-fortran-${version}.tar.bz2";
-      sha256 = "1b2wbysviyh7l9fqbd6zy5y6y89xgysy99gr8wx8xkc1hy2nwdsq";
+      sha256 = "1xf2njykv1qcgxiqwj693dxjf77ss1rcxirylvnsp5hs89mdlj12";
     }) ++
     optional langJava (fetchurl {
       url = "mirror://gcc/releases/gcc-${version}/gcc-java-${version}.tar.bz2";
-      sha256 = "1mlazpydd9qv7zwxkbb5sw3clfawfndhcc3f5lzycminvn6qmfkb";
+      sha256 = "1v3krhxi3zyaqfj0x8dbxvg67fjp29cr1psyf71r9zf757p3vqsw";
     });
     
   patches =
@@ -56,6 +57,7 @@ stdenv.mkDerivation ({
 
   configureFlags = "
     ${if enableMultilib then "" else "--disable-multilib"}
+    ${if enableShared then "" else "--disable-shared"}
     --disable-libstdcxx-pch
     --with-system-zlib
     --enable-languages=${
diff --git a/pkgs/development/compilers/ocaml/3.11.1.nix b/pkgs/development/compilers/ocaml/3.11.1.nix
index f5955c7c78c2f..d7053d583c239 100644
--- a/pkgs/development/compilers/ocaml/3.11.1.nix
+++ b/pkgs/development/compilers/ocaml/3.11.1.nix
@@ -1,5 +1,10 @@
 args: with args;
 
+let
+   useX11 = (stdenv.system != "armv5tel-linux");
+   useNativeCompilers = (stdenv.system != "armv5tel-linux");
+   inherit (stdenv.lib) optionals optionalString;
+in
 stdenv.mkDerivation (rec {
   
   name = "ocaml-3.11.1";
@@ -10,10 +15,10 @@ stdenv.mkDerivation (rec {
   };
 
   prefixKey = "-prefix ";
-  configureFlags = ["-no-tk" "-x11lib" x11];
-  buildFlags = "world bootstrap world.opt";
-  buildInputs = [x11 ncurses];
-  installTargets = "install installopt"; 
+  configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" x11 ];
+  buildFlags = "world" + optionalString useNativeCompilers " bootstrap world.opt";
+  buildInputs = [ncurses] ++ optionals useX11 [ x11 ];
+  installTargets = "install" + optionalString useNativeCompilers " installopt";
   patchPhase = ''
     CAT=$(type -tp cat)
     sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang
diff --git a/pkgs/development/compilers/ocaml/cvs.nix b/pkgs/development/compilers/ocaml/cvs.nix
new file mode 100644
index 0000000000000..475a1d46d5893
--- /dev/null
+++ b/pkgs/development/compilers/ocaml/cvs.nix
@@ -0,0 +1,31 @@
+args: with args;
+
+stdenv.mkDerivation (rec {
+  
+  name = "ocaml-cvs-2009-09-24";
+  
+  src = fetchcvs {
+    cvsRoot = ":pserver:anoncvs@camlcvs.inria.fr:/caml";
+    module = "ocaml";
+    date = "2009-09-24";
+    sha256 = "3909bffebc9ce36ca51711d7d95596cba94376ebb1975c6ed46b09c9892c3ef1";
+  };
+
+  prefixKey = "-prefix ";
+  configureFlags = ["-no-tk"];
+  buildFlags = "world" +
+    (if (stdenv.system != "armv5tel-linux") then "bootstrap world.opt" else "");
+  buildInputs = [ncurses];
+  installTargets = "install" + (if (stdenv.system != "armv5tel-linux") then "installopt" else ""); 
+  patchPhase = ''
+    CAT=$(type -tp cat)
+    sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang
+  '';
+
+  meta = {
+    homepage = http://caml.inria.fr/ocaml;
+    license = "QPL, LGPL2 (library part)";
+    desctiption = "Most popular variant of the Caml language";
+  };
+
+})
diff --git a/pkgs/development/interpreters/perl-5.10/default.nix b/pkgs/development/interpreters/perl-5.10/default.nix
index 442f428ac6f46..94fda842bb15d 100644
--- a/pkgs/development/interpreters/perl-5.10/default.nix
+++ b/pkgs/development/interpreters/perl-5.10/default.nix
@@ -2,6 +2,13 @@
 , impureLibcPath ? null
 }:
 
+let
+  preBuildNoNative = ''
+      # Make Cwd work on NixOS (where we don't have a /bin/pwd).
+      substituteInPlace lib/Cwd.pm --replace "'/bin/pwd'" "'$(type -tP pwd)'"
+    '';
+  preBuildNative = "";
+in
 stdenv.mkDerivation {
   name = "perl-5.10.0";
 
@@ -24,16 +31,21 @@ stdenv.mkDerivation {
   # "installstyle" option to ensure that modules are put under
   # $out/lib/perl5 - this is the general default, but because $out
   # contains the string "perl", Configure would select $out/lib.
-  configureFlags = ''
-    -de -Dcc=gcc -Uinstallusrbinperl -Dinstallstyle=lib/perl5 -Duseshrplib
-    ${if stdenv ? glibc then "-Dusethreads" else ""}
-  '';
+  # Miniperl needs -lm. perl needs -lrt.
+  configureFlags = [
+    "-de"
+    "-Dcc=gcc"
+    "-Uinstallusrbinperl"
+    "-Dinstallstyle=lib/perl5"
+    "-Duseshrplib"
+    (if stdenv ? glibc then "-Dusethreads" else "")
+  ];
 
   configureScript = "${stdenv.shell} ./Configure";
 
   dontAddPrefix = true;
 
-  preConfigure =
+  configurePhase =
     ''
       configureFlags="$configureFlags -Dprefix=$out -Dman1dir=$out/share/man/man1 -Dman3dir=$out/share/man/man3"
 
@@ -41,13 +53,11 @@ stdenv.mkDerivation {
         GLIBC=${if impureLibcPath == null then "$(cat $NIX_GCC/nix-support/orig-libc)" else impureLibcPath}
         configureFlags="$configureFlags -Dlocincpth=$GLIBC/include -Dloclibpth=$GLIBC/lib"
       fi
+      ${stdenv.shell} ./Configure $configureFlags \
+      ${if stdenv.system == "armv5tel-linux" then "-Dldflags=\"-lm -lrt\"" else ""};
     '';
 
-  preBuild =
-    ''
-      # Make Cwd work on NixOS (where we don't have a /bin/pwd).
-      ${if stdenv.system == "i686-darwin" then "" else "substituteInPlace lib/Cwd.pm --replace \"'/bin/pwd'\" \"'$(type -tP pwd)'\""}
-    '';
+  preBuild = if (stdenv.gcc.nativeTools) then preBuildNative else preBuildNoNative;
 
   setupHook = ./setup-hook.sh;
 }
diff --git a/pkgs/development/libraries/eglibc/builder.sh b/pkgs/development/libraries/eglibc/builder.sh
new file mode 100644
index 0000000000000..47cd1b5e252f7
--- /dev/null
+++ b/pkgs/development/libraries/eglibc/builder.sh
@@ -0,0 +1,63 @@
+# Glibc cannot have itself in its RPATH.
+export NIX_NO_SELF_RPATH=1
+
+source $stdenv/setup
+
+# Explicitly tell glibc to use our pwd, not /bin/pwd.
+export PWD_P=$(type -tP pwd)
+
+# Needed to install share/zoneinfo/zone.tab.  Set to impure /bin/sh to
+# prevent a retained dependency on the bootstrap tools in the
+# stdenv-linux bootstrap.
+export BASH_SHELL=/bin/sh
+
+preConfigure() {
+
+    for i in libc/configure libc/io/ftwtest-sh; do
+        # Can't use substituteInPlace here because replace hasn't been
+        # built yet in the bootstrap.
+        sed -i "$i" -e "s^/bin/pwd^$PWD_P^g"
+    done
+
+    # Include source for debugging
+    ensureDir $out/src
+    cp -R libc ports $out/src
+    ln -s $out/src/ports $out/src/libc/ports
+    # glibc wants -O2 minimum
+    export CFLAGS="-pipe -g -O2"
+
+    mkdir $NIX_BUILD_TOP/build
+    cd $NIX_BUILD_TOP/build
+    
+    configureScript=$out/src/libc/configure
+}
+
+
+postConfigure() {
+    # Hack: get rid of the `-static' flag set by the bootstrap stdenv.
+    # This has to be done *after* `configure' because it builds some
+    # test binaries.
+    export NIX_CFLAGS_LINK=
+    export NIX_LDFLAGS_BEFORE=
+
+    export NIX_DONT_SET_RPATH=1
+    unset CFLAGS
+}
+
+
+postInstall() {
+    if test -n "$installLocales"; then
+        make localedata/install-locales
+    fi
+    rm $out/etc/ld.so.cache
+    (cd $out/include && ln -s $kernelHeaders/include/* .) || exit 1
+
+    # Fix for NIXOS-54 (ldd not working on x86_64).  Make a symlink
+    # "lib64" to "lib".
+    if test -n "$is64bit"; then
+        ln -s lib $out/lib64
+    fi
+}
+
+
+genericBuild
diff --git a/pkgs/development/libraries/eglibc/default.nix b/pkgs/development/libraries/eglibc/default.nix
new file mode 100644
index 0000000000000..a27d0f53fbf83
--- /dev/null
+++ b/pkgs/development/libraries/eglibc/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchsvn, kernelHeaders
+, installLocales ? true
+, profilingLibraries ? false
+}:
+
+stdenv.mkDerivation rec {
+  name = "eglibc-2.10";
+
+  src = fetchsvn {
+    url = svn://svn.eglibc.org/branches/eglibc-2_10;
+    rev = 8690;
+    sha256 = "029hklrx2rlhsb5r2csd0gapjm0rbr8n28ib6jnnhms12x302viq";
+  };
+
+  inherit kernelHeaders installLocales;
+
+  configureFlags = [
+    "--with-headers=${kernelHeaders}/include"
+    "--without-fp"
+    "--enable-add-ons=libidn,ports,nptl"
+    "--disable-profile"
+    "--host=arm-linux-gnueabi"
+    "--build=arm-linux-gnueabi"
+  ];
+
+  builder = ./builder.sh;
+
+  meta = {
+    homepage = http://www.gnu.org/software/libc/;
+    description = "The GNU C Library";
+  };
+}
diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix
index 0bf2db03cd820..d3814bdb97241 100644
--- a/pkgs/development/libraries/freetype/default.nix
+++ b/pkgs/development/libraries/freetype/default.nix
@@ -1,5 +1,4 @@
 { stdenv, fetchurl
-
 , # FreeType supports hinting using a TrueType bytecode interpreter,
   # as well as sub-pixel rendering.  These are patented by Apple and
   # Microsoft, respectively, so they are disabled by default.  This
@@ -8,7 +7,7 @@
   useEncumberedCode ? false
 }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (rec {
   name = "freetype-2.3.11";
   
   src = fetchurl {
@@ -26,4 +25,7 @@ stdenv.mkDerivation rec {
     homepage = http://www.freetype.org/;
     license = "GPLv2+"; # or the FreeType License (BSD + advertising clause)
   };
-}
+} //
+# The asm for armel is written with the 'asm' keyword.
+(if (stdenv.system == "armv5tel-linux") then 
+    {CFLAGS = "-std=gnu99";} else {}))
diff --git a/pkgs/development/libraries/glibc-2.9/binutils-2.20.patch b/pkgs/development/libraries/glibc-2.9/binutils-2.20.patch
new file mode 100644
index 0000000000000..ab3d6144d6eef
--- /dev/null
+++ b/pkgs/development/libraries/glibc-2.9/binutils-2.20.patch
@@ -0,0 +1,42 @@
+Support GNU Binutils 2.20 and beyond.  Patch from
+http://sourceware.org/ml/libc-alpha/2009-09/msg00009.html .
+
+diff --git a/configure b/configure
+index 48e6952..b1d84d7 100755
+--- a/configure
++++ b/configure
+@@ -4841,7 +4841,7 @@ $as_echo_n "checking version of $AS... " >&6; }
+   ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+   case $ac_prog_version in
+     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+-    2.1[3-9]*)
++    2.1[3-9]*|[2-9].[2-9]*)
+        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ 
+@@ -4904,7 +4904,7 @@ $as_echo_n "checking version of $LD... " >&6; }
+   ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
+   case $ac_prog_version in
+     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+-    2.1[3-9]*)
++    2.1[3-9]*|[2-9].[2-9]*)
+        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ 
+diff --git a/configure.in b/configure.in
+index 4584afe..7c4f71f 100644
+--- a/configure.in
++++ b/configure.in
+@@ -897,10 +897,10 @@ AC_SUBST(MIG)dnl Needed by sysdeps/mach/configure.in
+ # Accept binutils 2.13 or newer.
+ AC_CHECK_PROG_VER(AS, $AS, --version,
+ 		  [GNU assembler.* \([0-9]*\.[0-9.]*\)],
+-		  [2.1[3-9]*], AS=: critic_missing="$critic_missing as")
++		  [2.1[3-9]*|[2-9].[2-9]*], AS=: critic_missing="$critic_missing as")
+ AC_CHECK_PROG_VER(LD, $LD, --version,
+ 		  [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)],
+-		  [2.1[3-9]*], LD=: critic_missing="$critic_missing ld")
++		  [2.1[3-9]*|[2-9].[2-9]*], LD=: critic_missing="$critic_missing ld")
+ 
+ # We need the physical current working directory.  We cannot use the
+ # "pwd -P" shell builtin since that's not portable.  Instead we try to
diff --git a/pkgs/development/libraries/glibc-2.9/builder.sh b/pkgs/development/libraries/glibc-2.9/builder.sh
index 8cc6be4cf738f..adb73656c2a23 100644
--- a/pkgs/development/libraries/glibc-2.9/builder.sh
+++ b/pkgs/development/libraries/glibc-2.9/builder.sh
@@ -26,11 +26,13 @@ preConfigure() {
     # don't want as a dependency in the Nixpkgs bootstrap.  So force
     # the output file to be newer.
     touch locale/C-translit.h
+
+    tar xvjf "$srcPorts"
     
-    mkdir ../build
-    cd ../build
+    mkdir build
+    cd build
     
-    configureScript=../$sourceRoot/configure
+    configureScript=../configure
 }
 
 
@@ -42,6 +44,7 @@ postConfigure() {
     export NIX_LDFLAGS_BEFORE=
 
     export NIX_DONT_SET_RPATH=1
+    unset CFLAGS
 }
 
 
diff --git a/pkgs/development/libraries/glibc-2.9/default.nix b/pkgs/development/libraries/glibc-2.9/default.nix
index c94cedab018c4..33f93befb218a 100644
--- a/pkgs/development/libraries/glibc-2.9/default.nix
+++ b/pkgs/development/libraries/glibc-2.9/default.nix
@@ -9,8 +9,13 @@ stdenv.mkDerivation rec {
   builder = ./builder.sh;
 
   src = fetchurl {
-    url = http://nixos.org/tarballs/glibc-2.9-20081208.tar.bz2;
-    sha256 = "0zhxbgcsl97pf349m0lz8d5ljvvzrcqc23yf08d888xlk4ms8m3h";
+    url = http://ftp.gnu.org/gnu/glibc/glibc-2.9.tar.bz2;
+    sha256 = "0v53m7flx6qcx7cvrvvw6a4dx4x3y6k8nvpc4wfv5xaaqy2am2q9";
+  };
+
+  srcPorts = fetchurl {
+    url = http://ftp.gnu.org/gnu/glibc/glibc-ports-2.9.tar.bz2;
+    sha256 = "0r2sn527wxqifi63di7ns9wbjh1cainxn978w178khhy7yw9fk42";
   };
 
   inherit kernelHeaders installLocales;
@@ -46,12 +51,28 @@ stdenv.mkDerivation rec {
 
     /* Have rpcgen(1) look for cpp(1) in $PATH.  */
     ./rpcgen-path.patch
+
+    /* Support GNU Binutils 2.20 and above.  */
+    ./binutils-2.20.patch
   ];
 
-  configureFlags = ''
-    --enable-add-ons
-    --with-headers=${kernelHeaders}/include
-    ${if profilingLibraries then "--enable-profile" else "--disable-profile"}
+  configureFlags = [
+    "--enable-add-ons"
+    "--with-headers=${kernelHeaders}/include"
+    (if profilingLibraries then "--enable-profile" else "--disable-profile")
+  ] ++ (if (stdenv.system == "armv5tel-linux") then [
+    "--host=arm-linux-gnueabi"
+    "--build=arm-linux-gnueabi"
+    "--without-fp"
+  ] else []);
+
+  preInstall = ''
+    ensureDir $out/lib
+    ln -s ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
+  '';
+
+  postInstall = ''
+    rm $out/lib/libgcc_s.so.1
   '';
 
   # Workaround for this bug:
diff --git a/pkgs/development/libraries/glibc-2.9/info.nix b/pkgs/development/libraries/glibc-2.9/info.nix
index 9653690606abd..3201bb4744055 100644
--- a/pkgs/development/libraries/glibc-2.9/info.nix
+++ b/pkgs/development/libraries/glibc-2.9/info.nix
@@ -8,6 +8,11 @@ stdenv.mkDerivation rec {
     sha256 = "0zhxbgcsl97pf349m0lz8d5ljvvzrcqc23yf08d888xlk4ms8m3h";
   };
 
+  patches = [
+    /* Support GNU Binutils 2.20 and above.  */
+    ./binutils-2.20.patch
+  ];
+
   preConfigure = ''
     export PWD_P=$(type -tP pwd)
     for i in configure io/ftwtest-sh; do
diff --git a/pkgs/development/libraries/glibc-2.9/locales.nix b/pkgs/development/libraries/glibc-2.9/locales.nix
index a5ef4797810bd..3046374ca3457 100644
--- a/pkgs/development/libraries/glibc-2.9/locales.nix
+++ b/pkgs/development/libraries/glibc-2.9/locales.nix
@@ -10,13 +10,35 @@
 
 stdenv.mkDerivation rec {
   name = "glibc-locales-2.9";
-  
+
+  builder = ./localesbuilder.sh;
+
   src = fetchurl {
-    url = http://nixos.org/tarballs/glibc-2.9-20081208.tar.bz2;
-    sha256 = "0zhxbgcsl97pf349m0lz8d5ljvvzrcqc23yf08d888xlk4ms8m3h";
+    url = http://ftp.gnu.org/gnu/glibc/glibc-2.9.tar.bz2;
+    sha256 = "0v53m7flx6qcx7cvrvvw6a4dx4x3y6k8nvpc4wfv5xaaqy2am2q9";
+  };
+
+  srcPorts = fetchurl {
+    url = http://ftp.gnu.org/gnu/glibc/glibc-ports-2.9.tar.bz2;
+    sha256 = "0r2sn527wxqifi63di7ns9wbjh1cainxn978w178khhy7yw9fk42";
   };
 
-  configurePhase = "true";
+  inherit (stdenv) is64bit;
+
+  configureFlags = [
+    "--enable-add-ons"
+    "--without-headers"
+    "--disable-profile"
+  ] ++ (if (stdenv.system == "armv5tel-linux") then [
+    "--host=arm-linux-gnueabi"
+    "--build=arm-linux-gnueabi"
+    "--without-fp"
+  ] else []);
+
+  patches = [
+    /* Support GNU Binutils 2.20 and above.  */
+    ./binutils-2.20.patch
+  ];
 
   # Awful hack: `localedef' doesn't allow the path to `locale-archive'
   # to be overriden, but you *can* specify a prefix, i.e. it will use
@@ -25,8 +47,6 @@ stdenv.mkDerivation rec {
   # $TMPDIR/nix/store/...-glibc-.../lib/locale/locale-archive.
   buildPhase =
     ''
-      touch config.make
-      touch config.status
       mkdir -p $TMPDIR/"$(dirname $(readlink -f $(type -p localedef)))/../lib/locale"
       make localedata/install-locales \
           LOCALEDEF="localedef --prefix=$TMPDIR" \
diff --git a/pkgs/development/libraries/glibc-2.9/localesbuilder.sh b/pkgs/development/libraries/glibc-2.9/localesbuilder.sh
new file mode 100644
index 0000000000000..a28f6bcbaeb37
--- /dev/null
+++ b/pkgs/development/libraries/glibc-2.9/localesbuilder.sh
@@ -0,0 +1,50 @@
+# Glibc cannot have itself in its RPATH.
+export NIX_NO_SELF_RPATH=1
+
+source $stdenv/setup
+
+# Explicitly tell glibc to use our pwd, not /bin/pwd.
+export PWD_P=$(type -tP pwd)
+
+# Needed to install share/zoneinfo/zone.tab.  Set to impure /bin/sh to
+# prevent a retained dependency on the bootstrap tools in the
+# stdenv-linux bootstrap.
+export BASH_SHELL=/bin/sh
+
+
+preConfigure() {
+
+    for i in configure io/ftwtest-sh; do
+        # Can't use substituteInPlace here because replace hasn't been
+        # built yet in the bootstrap.
+        sed -i "$i" -e "s^/bin/pwd^$PWD_P^g"
+    done
+
+    # In the glibc 2.6/2.7 tarballs C-translit.h is a little bit older
+    # than C-translit.h.in, forcing Make to rebuild it unnecessarily.
+    # This wouldn't be problem except that it requires Perl, which we
+    # don't want as a dependency in the Nixpkgs bootstrap.  So force
+    # the output file to be newer.
+    touch locale/C-translit.h
+
+    tar xvjf "$srcPorts"
+    
+    mkdir build
+    cd build
+    
+    configureScript=../configure
+}
+
+
+postConfigure() {
+    # Hack: get rid of the `-static' flag set by the bootstrap stdenv.
+    # This has to be done *after* `configure' because it builds some
+    # test binaries.
+    export NIX_CFLAGS_LINK=
+    export NIX_LDFLAGS_BEFORE=
+
+    export NIX_DONT_SET_RPATH=1
+    unset CFLAGS
+}
+
+genericBuild
diff --git a/pkgs/development/libraries/icu/default.nix b/pkgs/development/libraries/icu/default.nix
index 82ea06508f078..47217d7fa98a9 100644
--- a/pkgs/development/libraries/icu/default.nix
+++ b/pkgs/development/libraries/icu/default.nix
@@ -10,6 +10,9 @@ stdenv.mkDerivation {
 
   patchFlags = "-p0";
 
+  CFLAGS = "-O0";
+  CXXFLAGS = "-O0";
+
   patches = [
     (fetchurl {
       url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/dev-libs/icu/files/icu-3.8-setBreakType-public.diff?rev=1.1";
diff --git a/pkgs/development/libraries/libxcrypt/default.nix b/pkgs/development/libraries/libxcrypt/default.nix
index 7124fc72eeed0..1ae5d3054f486 100644
--- a/pkgs/development/libraries/libxcrypt/default.nix
+++ b/pkgs/development/libraries/libxcrypt/default.nix
@@ -1,4 +1,7 @@
 {stdenv, fetchurl}:
+
+# I could not build it in armv5tel-linux
+assert stdenv.system != "armv5tel-linux";
    
 stdenv.mkDerivation {
   name = "libxcrypt-3.0.2";
diff --git a/pkgs/development/libraries/readline/link-against-ncurses.patch b/pkgs/development/libraries/readline/link-against-ncurses.patch
new file mode 100644
index 0000000000000..0fd0598f4650f
--- /dev/null
+++ b/pkgs/development/libraries/readline/link-against-ncurses.patch
@@ -0,0 +1,18 @@
+This patch is to make sure that `libncurses' is among the `NEEDED'
+dependencies of `libreadline.so' and `libhistory.so'.
+
+Failing to do that, applications linking against Readline are
+forced to explicitly link against libncurses as well; in addition,
+this trick doesn't work when using GNU ld's `--as-needed'.
+
+--- shlib/Makefile.in	2009-01-06 18:03:22.000000000 +0100
++++ shlib/Makefile.in	2009-07-27 14:43:25.000000000 +0200
+@@ -84,7 +84,7 @@ SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@
+ SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@
+ SHOBJ_LIBS = @SHOBJ_LIBS@
+ 
+-SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@
++SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@ -lncurses
+ SHLIB_LIBS = @SHLIB_LIBS@
+ 
+ SHLIB_DOT = @SHLIB_DOT@
diff --git a/pkgs/development/libraries/readline/readline-patches.nix b/pkgs/development/libraries/readline/readline-patches.nix
new file mode 100644
index 0000000000000..701d5fc94cec0
--- /dev/null
+++ b/pkgs/development/libraries/readline/readline-patches.nix
@@ -0,0 +1,8 @@
+# Automatically generated by `update-patch-set.sh'; do not edit.
+
+patch: [
+(patch "001" "1wbqnsxm4nd8rjckl8mdqcb82pphnsj2yxs4f2nf88kyhwzy544i")
+(patch "002" "070c3jz8fs5q17yy3l70wxklgnw6hp5ac9zhb0jdnrr9hf0wi6kl")
+(patch "003" "1gwssafy42hcijcynmlpqsasch7kqxbv2cqw0p7f9p2y6vp9ng2j")
+(patch "004" "1yzaycdfqjs5jdl0k7qg9cx47bdlq9xs0m6lfq42ys3yscmb1jzm")
+]
diff --git a/pkgs/development/libraries/readline/readline6.nix b/pkgs/development/libraries/readline/readline6.nix
index fcf89207da3c1..60232a8b80bd1 100644
--- a/pkgs/development/libraries/readline/readline6.nix
+++ b/pkgs/development/libraries/readline/readline6.nix
@@ -9,7 +9,20 @@ stdenv.mkDerivation rec {
   };
 
   propagatedBuildInputs = [ncurses];
-  
+
+  patchFlags = "-p0";
+  patches =
+    [ ./link-against-ncurses.patch ]
+    ++
+    (let
+       patch = nr: sha256:
+         fetchurl {
+           url = "mirror://gnu/readline/readline-6.0-patches/readline60-${nr}";
+           inherit sha256;
+         };
+     in
+       import ./readline-patches.nix patch);
+
   meta = {
     description = "GNU Readline, a library for interactive line editing";
 
@@ -31,5 +44,7 @@ stdenv.mkDerivation rec {
     homepage = http://savannah.gnu.org/projects/readline/;
 
     license = "GPLv3+";
+
+    maintainers = [ stdenv.lib.maintainers.ludo ];
   };
 }
diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix
index 5bf14919f8516..4987dafd51149 100644
--- a/pkgs/development/tools/misc/binutils/default.nix
+++ b/pkgs/development/tools/misc/binutils/default.nix
@@ -1,11 +1,11 @@
 {stdenv, fetchurl, noSysDirs}:
 
 stdenv.mkDerivation rec {
-  name = "binutils-2.19.1";
-  
+  name = "binutils-2.20";
+
   src = fetchurl {
     url = "mirror://gnu/binutils/${name}.tar.bz2";
-    sha256 = "1xirhxwc94bk6hn2k6i5ly4knbcjsqgy2lp7kl1s5q5csys2b0iy";
+    sha256 = "1c3m789p5rwmmnck5ms4zcnc40axss3gxzivz571al1vmbq0kpz1";
   };
 
   patches = [
@@ -14,16 +14,16 @@ stdenv.mkDerivation rec {
     # RUNPATH can be overriden using LD_LIBRARY_PATH at runtime.
     ./new-dtags.patch
   ];
-  
+
   inherit noSysDirs;
 
   preConfigure = ''
     # Clear the default library search path.
     if test "$noSysDirs" = "1"; then
-        echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt
+	echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt
     fi
   '';
-  
+
   configureFlags = "--disable-werror"; # needed for dietlibc build
 
   meta = {
diff --git a/pkgs/development/tools/misc/strace/default.nix b/pkgs/development/tools/misc/strace/default.nix
index 38c4445d2200b..6300304cf6bf3 100644
--- a/pkgs/development/tools/misc/strace/default.nix
+++ b/pkgs/development/tools/misc/strace/default.nix
@@ -3,6 +3,8 @@
 stdenv.mkDerivation {
   name = "strace-4.5.18";
 
+  patches = [ ./strace-4.5.18-arm-syscalls.patch ];
+
   src = fetchurl {
     url = mirror://sourceforge/strace/strace-4.5.18.tar.bz2;
     sha256 = "1l16vax3mn2wak288g1inmn30i49vlghnvfwr0z2rwh41r3vgrwm";
diff --git a/pkgs/development/tools/misc/strace/strace-4.5.18-arm-syscalls.patch b/pkgs/development/tools/misc/strace/strace-4.5.18-arm-syscalls.patch
new file mode 100644
index 0000000000000..a2f50fd152f10
--- /dev/null
+++ b/pkgs/development/tools/misc/strace/strace-4.5.18-arm-syscalls.patch
@@ -0,0 +1,162 @@
+From f5da8d0c38ea0eb660cb17de7aa62cda6899eb75 Mon Sep 17 00:00:00 2001
+From: ldv <ldv>
+Date: Thu, 1 Jan 2009 23:20:38 +0000
+Subject: [PATCH] 2008-11-13  Kirill A. Shutemov  <kirill@shutemov.name>
+
+	* linux/arm/syscallent.h: Fix build on ARM EABI which does not
+	provide syscalls socketcall and ipc.
+---
+ ChangeLog              |    5 +++++
+ linux/arm/syscallent.h |    4 +++-
+ 2 files changed, 8 insertions(+), 1 deletions(-)
+
+diff --git a/linux/arm/syscallent.h b/linux/arm/syscallent.h
+index 5ccef2f..edc3641 100644
+--- a/linux/arm/syscallent.h
++++ b/linux/arm/syscallent.h
+@@ -431,6 +431,7 @@
+ 	{ 5,	0,	printargs,		"SYS_398"	}, /* 398 */
+ 	{ 5,	0,	printargs,		"SYS_399"	}, /* 399 */
+ 
++#ifndef __ARM_EABI__
+ #if SYS_socket_subcall != 400
+  #error fix me
+ #endif
+@@ -481,3 +482,4 @@
+ 	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 440 */
+ 	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 441 */
+ 	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 442 */
++#endif
+-- 
+1.6.1.3
+
+From 885d06bc92bae2f6aad85ef2fe0b806a06f60712 Mon Sep 17 00:00:00 2001
+From: ldv <ldv>
+Date: Thu, 1 Jan 2009 23:23:47 +0000
+Subject: [PATCH] 2008-11-13  Kirill A. Shutemov  <kirill@shutemov.name>
+
+	* linux/arm/syscallent.h: Update syscalls.
+	Based on patch by Enrico Scholz.
+---
+ ChangeLog              |    3 +
+ linux/arm/syscallent.h |   98 ++++++++++++++++++++++++------------------------
+ 2 files changed, 52 insertions(+), 49 deletions(-)
+
+diff --git a/linux/arm/syscallent.h b/linux/arm/syscallent.h
+index edc3641..6dd783a 100644
+--- a/linux/arm/syscallent.h
++++ b/linux/arm/syscallent.h
+@@ -328,63 +328,63 @@
+ 	{ 5,	TN,	sys_getsockopt,		"getsockopt"	}, /* 295 */
+ 	{ 3,	TN,	sys_sendmsg,		"sendmsg"	}, /* 296 */
+ 	{ 3,	TN,	sys_recvmsg,		"recvmsg"	}, /* 297 */
+-	{ 5,	0,	printargs,		"SYS_298"	}, /* 298 */
+-	{ 5,	0,	printargs,		"SYS_299"	}, /* 299 */
+-	{ 5,	0,	printargs,		"SYS_300"	}, /* 300 */
+-	{ 5,	0,	printargs,		"SYS_301"	}, /* 301 */
+-	{ 5,	0,	printargs,		"SYS_302"	}, /* 302 */
+-	{ 5,	0,	printargs,		"SYS_303"	}, /* 303 */
+-	{ 5,	0,	printargs,		"SYS_304"	}, /* 304 */
+-	{ 5,	0,	printargs,		"SYS_305"	}, /* 305 */
+-	{ 5,	0,	printargs,		"SYS_306"	}, /* 306 */
+-	{ 5,	0,	printargs,		"SYS_307"	}, /* 307 */
+-	{ 5,	0,	printargs,		"SYS_308"	}, /* 308 */
+-	{ 5,	0,	printargs,		"SYS_309"	}, /* 309 */
+-	{ 5,	0,	printargs,		"SYS_310"	}, /* 310 */
+-	{ 5,	0,	printargs,		"SYS_311"	}, /* 311 */
+-	{ 5,	0,	printargs,		"SYS_312"	}, /* 312 */
+-	{ 5,	0,	printargs,		"SYS_313"	}, /* 313 */
+-	{ 5,	0,	printargs,		"SYS_314"	}, /* 314 */
+-	{ 5,	0,	printargs,		"SYS_315"	}, /* 315 */
+-	{ 5,	0,	printargs,		"SYS_316"	}, /* 316 */
+-	{ 5,	0,	printargs,		"SYS_317"	}, /* 317 */
+-	{ 5,	0,	printargs,		"SYS_318"	}, /* 318 */
+-	{ 5,	0,	printargs,		"SYS_319"	}, /* 319 */
+-	{ 5,	0,	printargs,		"SYS_320"	}, /* 320 */
+-	{ 5,	0,	printargs,		"SYS_321"	}, /* 321 */
+-	{ 5,	0,	printargs,		"SYS_322"	}, /* 322 */
+-	{ 5,	0,	printargs,		"SYS_323"	}, /* 323 */
+-	{ 5,	0,	printargs,		"SYS_324"	}, /* 324 */
+-	{ 5,	0,	printargs,		"SYS_325"	}, /* 325 */
+-	{ 5,	0,	printargs,		"SYS_326"	}, /* 326 */
+-	{ 5,	0,	printargs,		"SYS_327"	}, /* 327 */
+-	{ 5,	0,	printargs,		"SYS_328"	}, /* 328 */
+-	{ 5,	0,	printargs,		"SYS_329"	}, /* 329 */
+-	{ 5,	0,	printargs,		"SYS_330"	}, /* 330 */
+-	{ 5,	0,	printargs,		"SYS_331"	}, /* 331 */
+-	{ 5,	0,	printargs,		"SYS_332"	}, /* 332 */
+-	{ 5,	0,	printargs,		"SYS_333"	}, /* 333 */
+-	{ 5,	0,	printargs,		"SYS_334"	}, /* 334 */
++	{ 4,	TI,	sys_semop,		"semop"		}, /* 298 */
++	{ 4,	TI,	sys_semget,		"semget"	}, /* 299 */
++	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 300 */
++	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 301 */
++	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 302 */
++	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 303 */
++	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 304 */
++	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 305 */
++	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 306 */
++	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 307 */
++	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 308 */
++	{ 5,	0,	printargs,		"add_key"	}, /* 309 */
++	{ 4,	0,	printargs,		"request_key"	}, /* 310 */
++	{ 5,	0,	printargs,		"keyctl"	}, /* 311 */
++	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 312 */
++	{ 5,	0,	printargs,		"vserver"	}, /* 313 */
++	{ 3,	0,	printargs,		"ioprio_set"	}, /* 314 */
++	{ 2,	0,	printargs,		"ioprio_get"	}, /* 315 */
++	{ 0,	TD,	printargs,		"inotify_init"	}, /* 316 */
++	{ 3,	TD,	sys_inotify_add_watch,	"inotify_add_watch" }, /* 317 */
++	{ 2,	TD,	sys_inotify_rm_watch,	"inotify_rm_watch" }, /* 318 */
++	{ 6,	0,	sys_mbind,		"mbind"		}, /* 319 */
++	{ 3,	0,	sys_set_mempolicy,	"set_mempolicy"	}, /* 320 */
++	{ 5,	0,	sys_get_mempolicy,	"get_mempolicy"	}, /* 321 */
++	{ 4,	TD|TF,	sys_openat,		"openat"	}, /* 322 */
++	{ 3,	TD|TF,	sys_mkdirat,		"mkdirat"	}, /* 323 */
++	{ 4,	TD|TF,	sys_mknodat,		"mknodat"	}, /* 324 */
++	{ 5,	TD|TF,	sys_fchownat,		"fchownat"	}, /* 325 */
++	{ 3,	TD|TF,	sys_futimesat,		"futimesat"	}, /* 326 */
++	{ 4,	TD|TD,	sys_newfstatat,		"newfstatat"	}, /* 327 */
++	{ 3,	TD|TF,	sys_unlinkat,		"unlinkat"	}, /* 328 */
++	{ 4,	TD|TF,	sys_renameat,		"renameat"	}, /* 329 */
++	{ 5,	TD|TF,	sys_linkat,		"linkat"	}, /* 330 */
++	{ 3,	TD|TF,	sys_symlinkat,		"symlinkat"	}, /* 331 */
++	{ 4,	TD|TF,	sys_readlinkat,		"readlinkat"	}, /* 332 */
++	{ 3,	TD|TF,	sys_fchmodat,		"fchmodat"	}, /* 333 */
++	{ 3,	TD|TF,	sys_faccessat,		"faccessat"	}, /* 334 */
+ 	{ 5,	0,	printargs,		"SYS_335"	}, /* 335 */
+ 	{ 5,	0,	printargs,		"SYS_336"	}, /* 336 */
+-	{ 5,	0,	printargs,		"SYS_337"	}, /* 337 */
+-	{ 5,	0,	printargs,		"SYS_338"	}, /* 338 */
+-	{ 5,	0,	printargs,		"SYS_339"	}, /* 339 */
+-	{ 5,	0,	printargs,		"SYS_340"	}, /* 340 */
++	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 337 */
++	{ 2,	0,	printargs,		"set_robust_list" }, /* 338 */
++	{ 3,	0,	printargs,		"get_robust_list" }, /* 339 */
++	{ 6,	TD,	printargs,		"splice"	}, /* 340 */
+ 	{ 5,	0,	printargs,		"SYS_341"	}, /* 341 */
+-	{ 5,	0,	printargs,		"SYS_342"	}, /* 342 */
+-	{ 5,	0,	printargs,		"SYS_343"	}, /* 343 */
++	{ 4,	TD,	printargs,		"tee"		}, /* 342 */
++	{ 4,	TD,	printargs,		"vmsplice"	}, /* 343 */
+ 	{ 6,	0,	sys_move_pages,		"move_pages"	}, /* 344 */
+ 	{ 3,	0,	sys_getcpu,		"getcpu"	}, /* 345 */
+ 	{ 5,	0,	printargs,		"SYS_346"	}, /* 346 */
+-	{ 5,	0,	printargs,		"SYS_347"	}, /* 347 */
+-	{ 5,	0,	printargs,		"SYS_348"	}, /* 348 */
++	{ 5,	0,	printargs,		"kexec_load"	}, /* 347 */
++	{ 4,	TD|TF,	sys_utimensat,		"utimensat"	}, /* 348 */
+ 	{ 3,	TD|TS,	sys_signalfd,		"signalfd"	}, /* 349 */
+ 	{ 4,	TD,	sys_timerfd,		"timerfd"	}, /* 350 */
+ 	{ 1,	TD,	sys_eventfd,		"eventfd"	}, /* 351 */
+-	{ 5,	0,	printargs,		"SYS_352"	}, /* 352 */
+-	{ 5,	0,	printargs,		"SYS_353"	}, /* 353 */
+-	{ 5,	0,	printargs,		"SYS_354"	}, /* 354 */
++	{ 6,	TF,	sys_fallocate,		"fallocate"	}, /* 352 */
++	{ 4,	TD,	sys_timerfd_settime,	"timerfd_settime"}, /* 353 */
++	{ 2,	TD,	sys_timerfd_gettime,	"timerfd_gettime"}, /* 354 */
+ 	{ 5,	0,	printargs,		"SYS_355"	}, /* 355 */
+ 	{ 5,	0,	printargs,		"SYS_356"	}, /* 356 */
+ 	{ 5,	0,	printargs,		"SYS_357"	}, /* 357 */
+-- 
+1.6.1.3