Adding gdbCross, to have a gdb for other targets than native.

svn path=/nixpkgs/branches/stdenv-updates/; revision=18772
This commit is contained in:
Lluís Batlle i Rossell 2009-12-02 20:54:40 +00:00
parent 6fadcfbd03
commit 6c0b8d954a
2 changed files with 16 additions and 4 deletions

View File

@ -1,10 +1,15 @@
{ fetchurl, stdenv, ncurses, readline, gmp, mpfr, expat, texinfo }:
{ fetchurl, stdenv, ncurses, readline, gmp, mpfr, expat, texinfo
, target ? null }:
let
basename = "gdb-7.0";
in
stdenv.mkDerivation rec {
name = "gdb-7.0";
name = basename + stdenv.lib.optionalString (target != null)
("-" + target.config);
src = fetchurl {
url = "mirror://gnu/gdb/${name}.tar.bz2";
url = "mirror://gnu/gdb/${basename}.tar.bz2";
sha256 = "1k9y271gnnvi0fny8ycydcd79snigwh88rgwi03ad782r2awcl67";
};
@ -14,7 +19,8 @@ stdenv.mkDerivation rec {
configureFlags =
'' --with-gmp=${gmp} --with-mpfr=${mpfr} --with-system-readline
--with-expat --with-libexpat-prefix=${expat}
'';
'' + stdenv.lib.optionalString (target != null)
" --target=${target.config}";
postInstall =
'' # Remove Info files already provided by Binutils and other packages.

View File

@ -2985,6 +2985,12 @@ let
readline = readline5;
};
gdbCross = import ../development/tools/misc/gdb {
inherit fetchurl stdenv ncurses gmp mpfr expat texinfo;
readline = readline5;
target = crossSystem;
};
valgrind = import ../development/tools/analysis/valgrind {
inherit fetchurl stdenv perl gdb;
};