Adding gdbCross, to have a gdb for other targets than native.
svn path=/nixpkgs/branches/stdenv-updates/; revision=18772
This commit is contained in:
parent
6fadcfbd03
commit
6c0b8d954a
@ -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 {
|
stdenv.mkDerivation rec {
|
||||||
name = "gdb-7.0";
|
name = basename + stdenv.lib.optionalString (target != null)
|
||||||
|
("-" + target.config);
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnu/gdb/${name}.tar.bz2";
|
url = "mirror://gnu/gdb/${basename}.tar.bz2";
|
||||||
sha256 = "1k9y271gnnvi0fny8ycydcd79snigwh88rgwi03ad782r2awcl67";
|
sha256 = "1k9y271gnnvi0fny8ycydcd79snigwh88rgwi03ad782r2awcl67";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -14,7 +19,8 @@ stdenv.mkDerivation rec {
|
|||||||
configureFlags =
|
configureFlags =
|
||||||
'' --with-gmp=${gmp} --with-mpfr=${mpfr} --with-system-readline
|
'' --with-gmp=${gmp} --with-mpfr=${mpfr} --with-system-readline
|
||||||
--with-expat --with-libexpat-prefix=${expat}
|
--with-expat --with-libexpat-prefix=${expat}
|
||||||
'';
|
'' + stdenv.lib.optionalString (target != null)
|
||||||
|
" --target=${target.config}";
|
||||||
|
|
||||||
postInstall =
|
postInstall =
|
||||||
'' # Remove Info files already provided by Binutils and other packages.
|
'' # Remove Info files already provided by Binutils and other packages.
|
||||||
|
@ -2985,6 +2985,12 @@ let
|
|||||||
readline = readline5;
|
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 {
|
valgrind = import ../development/tools/analysis/valgrind {
|
||||||
inherit fetchurl stdenv perl gdb;
|
inherit fetchurl stdenv perl gdb;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user