public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* [updated zlib PATCH 3 of 3] debug/gdb: use the prebuilt zlib
@ 2011-11-23 12:01 Zhenqiang Chen
  0 siblings, 0 replies; only message in thread
From: Zhenqiang Chen @ 2011-11-23 12:01 UTC (permalink / raw)
  To: yann.morin.1998; +Cc: crossgcc

# 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-23 12:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-23 12:01 [updated zlib PATCH 3 of 3] debug/gdb: use the prebuilt zlib Zhenqiang Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).