From 8a6d956634830b9427c09aeeabb167be0225ae5a Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 27 Apr 2008 10:25:02 +0000 Subject: 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 --git a/config/debug/gdb.in b/config/debug/gdb.in index a94e813..fc294d3 100644 --- a/config/debug/gdb.in +++ b/config/debug/gdb.in @@ -16,6 +16,15 @@ config GDB_CROSS 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 --git a/scripts/build/debug/gdb.sh b/scripts/build/debug/gdb.sh index 14873a3..7140a0f 100644 --- a/scripts/build/debug/gdb.sh +++ b/scripts/build/debug/gdb.sh @@ -42,6 +42,15 @@ do_debug_gdb_build() { 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} \ -- cgit v0.10.2-6-g49f6