# HG changeset patch # User "Yann E. MORIN" # Date 1182095173 0 # Node ID 043e44606e28a85cace26a954284273dc2281546 # Parent 75f3f975e2ad8854bc079fac6ba2f31dec259489 Offer an option to build the gdbserver statically. This helps in case of debugging shared library loading. diff -r 75f3f975e2ad -r 043e44606e28 config/debug/gdb.in --- a/config/debug/gdb.in Sun Jun 17 14:51:37 2007 +0000 +++ b/config/debug/gdb.in Sun Jun 17 15:46:13 2007 +0000 @@ -16,6 +16,15 @@ help Build and install a cross-gdb for the target, and to run on host. +config GDB_CROSS_STATIC_GDBSERVER + bool + prompt "Build a static gdbserver" + default n + depends on GDB_CROSS + help + In case you have trouble with dynamic loading of shared libraries, + you will find that a static gdbserver comes in handy. + config GDB_NATIVE bool prompt "Native gdb (EXPERIMENTAL)" diff -r 75f3f975e2ad -r 043e44606e28 scripts/build/debug/gdb.sh --- a/scripts/build/debug/gdb.sh Sun Jun 17 14:51:37 2007 +0000 +++ b/scripts/build/debug/gdb.sh Sun Jun 17 15:46:13 2007 +0000 @@ -70,6 +70,12 @@ # Bah, GNU folks strike again... :-( chmod +x "${gdb_src_dir}/gdb/gdbserver/configure" + gdbserver_LDFLAGS= + if [ "${CT_GDB_CROSS_STATIC_GDBSERVER}" = "y" ]; then + gdbserver_LDFLAGS=-static + fi + + LDFLAGS="${gdbserver_LDFLAGS}" \ "${gdb_src_dir}/gdb/gdbserver/configure" \ --build=${CT_BUILD} \ --host=${CT_TARGET} \