GDB: Allow cross-compilation for GNU.
svn path=/nixpkgs/trunk/; revision=30481
This commit is contained in:
parent
351ff3583d
commit
a148b889f1
@ -4,6 +4,9 @@
|
|||||||
# Set it to true to fetch the latest release/branchpoint from git.
|
# Set it to true to fetch the latest release/branchpoint from git.
|
||||||
, bleedingEdgeVersion ? false
|
, bleedingEdgeVersion ? false
|
||||||
|
|
||||||
|
# Additional dependencies for GNU/Hurd.
|
||||||
|
, mig ? null, hurd ? null
|
||||||
|
|
||||||
# needed for the git version
|
# needed for the git version
|
||||||
, flex, bison }:
|
, flex, bison }:
|
||||||
|
|
||||||
@ -12,8 +15,17 @@ let
|
|||||||
if bleedingEdgeVersion
|
if bleedingEdgeVersion
|
||||||
then "gdb-7.3.20110726"
|
then "gdb-7.3.20110726"
|
||||||
else "gdb-7.3.1";
|
else "gdb-7.3.1";
|
||||||
|
|
||||||
|
# Whether (cross-)building for GNU/Hurd. This is an approximation since
|
||||||
|
# having `stdenv ? cross' doesn't tell us if we're building `hostDrv' and
|
||||||
|
# `buildDrv'.
|
||||||
|
isGNU =
|
||||||
|
stdenv.system == "i586-pc-gnu"
|
||||||
|
|| (stdenv ? cross && stdenv.cross.config == "i586-pc-gnu");
|
||||||
in
|
in
|
||||||
|
|
||||||
|
assert isGNU -> mig != null && hurd != null;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = basename + stdenv.lib.optionalString (target != null)
|
name = basename + stdenv.lib.optionalString (target != null)
|
||||||
("-" + target.config);
|
("-" + target.config);
|
||||||
@ -34,9 +46,11 @@ stdenv.mkDerivation rec {
|
|||||||
# I think python is not a native input, but I leave it
|
# I think python is not a native input, but I leave it
|
||||||
# here while I will not need it cross building
|
# here while I will not need it cross building
|
||||||
buildNativeInputs = [ texinfo python ]
|
buildNativeInputs = [ texinfo python ]
|
||||||
|
++ stdenv.lib.optional isGNU mig
|
||||||
++ stdenv.lib.optionals bleedingEdgeVersion [ flex bison ];
|
++ stdenv.lib.optionals bleedingEdgeVersion [ flex bison ];
|
||||||
|
|
||||||
buildInputs = [ ncurses readline gmp mpfr expat ]
|
buildInputs = [ ncurses readline gmp mpfr expat ]
|
||||||
|
++ stdenv.lib.optional isGNU hurd
|
||||||
++ stdenv.lib.optional doCheck dejagnu;
|
++ stdenv.lib.optional doCheck dejagnu;
|
||||||
|
|
||||||
configureFlags = with stdenv.lib;
|
configureFlags = with stdenv.lib;
|
||||||
|
@ -3042,6 +3042,8 @@ let
|
|||||||
|
|
||||||
gdb = callPackage ../development/tools/misc/gdb {
|
gdb = callPackage ../development/tools/misc/gdb {
|
||||||
readline = readline5;
|
readline = readline5;
|
||||||
|
hurd = gnu.hurdCross;
|
||||||
|
inherit (gnu) mig;
|
||||||
};
|
};
|
||||||
|
|
||||||
gdbCross = callPackage ../development/tools/misc/gdb {
|
gdbCross = callPackage ../development/tools/misc/gdb {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user