# HG changeset patch # User "Yann E. MORIN" # Date 1209291902 0 # Node ID 578fdd250fcc1f9942a1f7f532858826be5b2a14 # Parent e34a92db3a7358fcfe10c790a3918138e4f837a0 Offer an option to build a static cross-gdb. /trunk/scripts/build/debug/gdb.sh | 9 9 0 0 +++++++++ /trunk/config/debug/gdb.in | 9 9 0 0 +++++++++ 2 files changed, 18 insertions(+) diff -r e34a92db3a73 -r 578fdd250fcc config/debug/gdb.in --- a/config/debug/gdb.in Sun Apr 27 09:57:50 2008 +0000 +++ b/config/debug/gdb.in Sun Apr 27 10:25:02 2008 +0000 @@ -16,6 +16,15 @@ help Build and install a cross-gdb for the target, and to run on host. +config GDB_CROSS_STATIC_GDB + bool + prompt "Build a static cross gdb" + default n + depends on GDB_CROSS + help + A static cross gdb can be usefull if you debug on a machine that is + not the one that is used to compile. + config GDB_CROSS_STATIC_GDBSERVER bool prompt "Build a static gdbserver" diff -r e34a92db3a73 -r 578fdd250fcc scripts/build/debug/gdb.sh --- a/scripts/build/debug/gdb.sh Sun Apr 27 09:57:50 2008 +0000 +++ b/scripts/build/debug/gdb.sh Sun Apr 27 10:25:02 2008 +0000 @@ -42,6 +42,15 @@ mkdir -p "${CT_BUILD_DIR}/build-gdb-cross" cd "${CT_BUILD_DIR}/build-gdb-cross" + CC_for_gdb= + LD_for_gdb= + if [ "${CT_GDB_CROSS_STATIC_GDBSERVER}" = "y" ]; then + CC_for_gdb="gcc -static" + LD_for_gdb="ld -static" + fi + + CC="${CC_for_gdb}" \ + LD="${LD_forgdb}" \ "${gdb_src_dir}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \