Making the definition of the cross compiling target an attribute set.

svn path=/nixpkgs/branches/stdenv-updates/; revision=18378
This commit is contained in:
Lluís Batlle i Rossell
2009-11-16 23:21:13 +00:00
parent d82c7e0a69
commit 2c7fa189fb
11 changed files with 51 additions and 42 deletions

View File

@@ -4,7 +4,7 @@ let
basename = "binutils-2.20";
in
stdenv.mkDerivation rec {
name = basename + stdenv.lib.optionalString (cross != null) "-${cross}";
name = basename + stdenv.lib.optionalString (cross != null) "-${cross.config}";
src = fetchurl {
url = "mirror://gnu/binutils/${basename}.tar.bz2";
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
'';
configureFlags = "--disable-werror" # needed for dietlibc build
+ stdenv.lib.optionalString (cross != null) " --target=${cross}";
+ stdenv.lib.optionalString (cross != null) " --target=${cross.config}";
meta = {
description = "GNU Binutils, tools for manipulating binaries (linker, assembler, etc.)";