This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[updated zlib PATCH 3 of 3] debug/gdb: use the prebuilt zlib


# HG changeset patch
# User Zhenqiang Chen <zhenqiang.chen@linaro.org>
# Date 1322037592 -28800
# Node ID 6b450e80f73e1d3b7b024820e5999926dd809453
# Parent  d681a5a526e81fdda839a04b27fcb6bce50f65a7
debug/gdb: use the prebuilt zlib to build gdb cross
to remove the dependence on system zlib.

Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>

diff --git a/config/debug/gdb.in.cross b/config/debug/gdb.in.cross
--- a/config/debug/gdb.in.cross
+++ b/config/debug/gdb.in.cross
@@ -8,6 +8,7 @@
     prompt "Cross-gdb"
     default y
     select GDB_GDBSERVER if ! BARE_METAL
+    select ZLIB_NEEDED
     help
       Build and install a cross-gdb for the target, to run on host.

@@ -29,6 +30,7 @@
     prompt "Enable python scripting"
     depends on ! GDB_CROSS_STATIC
     default y
+    select ZLIB_NEEDED
     help
       Say 'y' if you want to use Python scripting inside gdb.
       Say 'n' if you do not want to.
diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
--- a/scripts/build/debug/300-gdb.sh
+++ b/scripts/build/debug/300-gdb.sh
@@ -106,6 +106,8 @@
     if [ "${CT_GDB_CROSS}" = "y" ]; then
         local -a cross_extra_config
         local gcc_version
+        local -a gdb_cross_CFLAGS
+        local -a gdb_cross_LDFLAGS

         CT_DoStep INFO "Installing cross-gdb"
         CT_DoLog EXTRA "Configuring cross-gdb"
@@ -135,9 +137,17 @@

CT_DoLog DEBUG "Extra config passed: '${cross_extra_config[*]}'"

+        gdb_cross_CFLAGS=${CT_CFLAGS_FOR_HOST}
+        if [ "${CT_ZLIB_NEEDED}" = "y" ]; then
+            gdb_cross_CFLAGS+=" -I${CT_COMPLIBS_DIR}/zlib/include"
+            gdb_cross_LDFLAGS+=" -L${CT_COMPLIBS_DIR}/zlib/lib"
+        fi
+
         CT_DoExecLog CFG                                \
         CC="${CC_for_gdb}"                              \
         LD="${LD_for_gdb}"                              \
+        CFLAGS="${gdb_cross_CFLAGS}"                    \
+        LDFLAGS="${gdb_cross_LDFLAGS}"                  \
         "${gdb_cross_configure}"                        \
             --build=${CT_BUILD}                         \
             --host=${CT_HOST}                           \

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]