Author: viric
Date: Mon Oct 11 23:18:00 2010
New Revision: 24229
URL: https://svn.nixos.org/websvn/nix/?rev=24229&sc=1

Log:
Reverting the patch that disabled using the 'binutils snapshot', because it's
needed for the fuloong minipc. It was not enough having the loongson2f patches;
only having the patches, we got troubles building cups with a segfault on the
dynamic loader running their 'genstrings' program.  And if sysvinit needs newer
binutils (I can't remember why, but I wrote it in the all-packages.nix before),
then let's use the snapshot.

As a note about "why this snapshot" (civodul was interested), when I knew that
we needed an unreleased version of binutils I went to download the snapshot of
the day. And it worked. This is all the story.

Added:
   
nixpkgs/branches/stdenv-updates/pkgs/development/tools/misc/binutils/snapshot.nix
      - copied, changed from r24205, 
nixpkgs/branches/stdenv-updates/pkgs/development/tools/misc/binutils/default.nix
Deleted:
   
nixpkgs/branches/stdenv-updates/pkgs/development/tools/misc/binutils/loongson2f.patch
   
nixpkgs/branches/stdenv-updates/pkgs/development/tools/misc/binutils/version-bump.patch
Modified:
   
nixpkgs/branches/stdenv-updates/pkgs/development/tools/misc/binutils/default.nix
   nixpkgs/branches/stdenv-updates/pkgs/top-level/all-packages.nix

Modified: 
nixpkgs/branches/stdenv-updates/pkgs/development/tools/misc/binutils/default.nix
==============================================================================
--- 
nixpkgs/branches/stdenv-updates/pkgs/development/tools/misc/binutils/default.nix
    Mon Oct 11 22:11:54 2010        (r24228)
+++ 
nixpkgs/branches/stdenv-updates/pkgs/development/tools/misc/binutils/default.nix
    Mon Oct 11 23:18:00 2010        (r24229)
@@ -2,13 +2,9 @@
 
 let
     basename = "binutils-2.20.1";
-
-    targetIsMips = stdenv.system == "mips64-linux" || (cross != null && 
cross.arch == "mips");
 in
 stdenv.mkDerivation rec {
-  # In the case of targetIsMips we apply a version-bump patch
-  name = (if targetIsMips then "binutils-2.20.51" else
-    basename) + stdenv.lib.optionalString (cross != null) "-${cross.config}";
+  name = basename + stdenv.lib.optionalString (cross != null) 
"-${cross.config}";
 
   src = fetchurl {
     url = "mirror://gnu/binutils/${basename}.tar.bz2";
@@ -20,11 +16,7 @@
     # RUNPATH instead of RPATH on binaries.  This is important because
     # RUNPATH can be overriden using LD_LIBRARY_PATH at runtime.
     ./new-dtags.patch
-  ]
-    # For loongson2f (the only mips running nixos now) we need these patches 
for
-    # linux to build. It checks the binutils version, so we have even to 
udpate the
-    # version.
-    ++ stdenv.lib.optionals targetIsMips [ ./loongson2f.patch 
./version-bump.patch ];
+  ];
 
   inherit noSysDirs;
 

Copied and modified: 
nixpkgs/branches/stdenv-updates/pkgs/development/tools/misc/binutils/snapshot.nix
 (from r24205, 
nixpkgs/branches/stdenv-updates/pkgs/development/tools/misc/binutils/default.nix)
==============================================================================
--- 
nixpkgs/branches/stdenv-updates/pkgs/development/tools/misc/binutils/default.nix
    Sun Oct 10 14:45:42 2010        (r24205, copy source)
+++ 
nixpkgs/branches/stdenv-updates/pkgs/development/tools/misc/binutils/snapshot.nix
   Mon Oct 11 23:18:00 2010        (r24229)
@@ -1,18 +1,14 @@
 {stdenv, fetchurl, noSysDirs, cross ? null}:
 
 let
-    basename = "binutils-2.20.1";
-
-    targetIsMips = stdenv.system == "mips64-linux" || (cross != null && 
cross.arch == "mips");
+    basename = "binutils-2.20.51";
 in
 stdenv.mkDerivation rec {
-  # In the case of targetIsMips we apply a version-bump patch
-  name = (if targetIsMips then "binutils-2.20.51" else
-    basename) + stdenv.lib.optionalString (cross != null) "-${cross.config}";
+  name = basename + stdenv.lib.optionalString (cross != null) 
"-${cross.config}";
 
   src = fetchurl {
-    url = "mirror://gnu/binutils/${basename}.tar.bz2";
-    sha256 = "1y7nwsprhr4hvx9ps2l0l0ivb6k41rcrx1invmzqxs475mr892r2";
+    url = http://nixos.org/tarballs/binutils-2.20.51-pre-20100901.tar.bz2;
+    sha256 = "1872fdnbnq5z5svq7mvc0vyyad8pknwvx2glxq1bbk0xv7arp72y";
   };
 
   patches = [
@@ -20,11 +16,7 @@
     # RUNPATH instead of RPATH on binaries.  This is important because
     # RUNPATH can be overriden using LD_LIBRARY_PATH at runtime.
     ./new-dtags.patch
-  ]
-    # For loongson2f (the only mips running nixos now) we need these patches 
for
-    # linux to build. It checks the binutils version, so we have even to 
udpate the
-    # version.
-    ++ stdenv.lib.optionals targetIsMips [ ./loongson2f.patch 
./version-bump.patch ];
+  ];
 
   inherit noSysDirs;
 
@@ -42,6 +34,8 @@
   '';
 
   configureFlags = "--disable-werror" # needed for dietlibc build
+      + stdenv.lib.optionalString (stdenv.system == "mips64-linux")
+        " --enable-fix-loongson2f-nop"
       + stdenv.lib.optionalString (cross != null) " --target=${cross.config}";
 
   meta = {

Modified: nixpkgs/branches/stdenv-updates/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/branches/stdenv-updates/pkgs/top-level/all-packages.nix     Mon Oct 
11 22:11:54 2010        (r24228)
+++ nixpkgs/branches/stdenv-updates/pkgs/top-level/all-packages.nix     Mon Oct 
11 23:18:00 2010        (r24229)
@@ -2291,10 +2291,17 @@
 
   avrdude = callPackage ../development/tools/misc/avrdude { };
 
-  binutils = callPackage ../development/tools/misc/binutils {
+  binutils_release = callPackage ../development/tools/misc/binutils {
     inherit noSysDirs;
   };
 
+  binutils_snapshot = callPackage 
../development/tools/misc/binutils/snapshot.nix {
+    inherit noSysDirs;
+  };
+
+  # We are waiting for a release. Meanwhile, sysvinit and the loongson2f need 
it.
+  binutils = binutils_snapshot;
+
   binutilsCross = forceBuildDrv (import ../development/tools/misc/binutils {
       inherit stdenv fetchurl;
       noSysDirs = true;
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to