Offer an option to build a static cross-gdb.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Apr 27 10:25:02 2008 +0000 (2008-04-27)
changeset 457578fdd250fcc
parent 456 e34a92db3a73
child 458 17f3122a2864
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(+)
config/debug/gdb.in
scripts/build/debug/gdb.sh
     1.1 --- a/config/debug/gdb.in	Sun Apr 27 09:57:50 2008 +0000
     1.2 +++ b/config/debug/gdb.in	Sun Apr 27 10:25:02 2008 +0000
     1.3 @@ -16,6 +16,15 @@
     1.4      help
     1.5        Build and install a cross-gdb for the target, and to run on host.
     1.6  
     1.7 +config GDB_CROSS_STATIC_GDB
     1.8 +    bool
     1.9 +    prompt "Build a static cross gdb"
    1.10 +    default n
    1.11 +    depends on GDB_CROSS
    1.12 +    help
    1.13 +      A static cross gdb can be usefull if you debug on a machine that is
    1.14 +      not the one that is used to compile.
    1.15 +
    1.16  config GDB_CROSS_STATIC_GDBSERVER
    1.17      bool
    1.18      prompt "Build a static gdbserver"
     2.1 --- a/scripts/build/debug/gdb.sh	Sun Apr 27 09:57:50 2008 +0000
     2.2 +++ b/scripts/build/debug/gdb.sh	Sun Apr 27 10:25:02 2008 +0000
     2.3 @@ -42,6 +42,15 @@
     2.4          mkdir -p "${CT_BUILD_DIR}/build-gdb-cross"
     2.5          cd "${CT_BUILD_DIR}/build-gdb-cross"
     2.6  
     2.7 +        CC_for_gdb=
     2.8 +        LD_for_gdb=
     2.9 +        if [ "${CT_GDB_CROSS_STATIC_GDBSERVER}" = "y" ]; then
    2.10 +            CC_for_gdb="gcc -static"
    2.11 +            LD_for_gdb="ld -static"
    2.12 +        fi
    2.13 +
    2.14 +        CC="${CC_for_gdb}"                              \
    2.15 +        LD="${LD_forgdb}"                               \
    2.16          "${gdb_src_dir}/configure"                      \
    2.17              --build=${CT_BUILD}                         \
    2.18              --host=${CT_HOST}                           \