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]

[zlib PATCH 3 of 3] debug/gdb: Use the prebuilt zlib to build gdb cross


# HG changeset patch
# User Zhenqiang Chen <zhenqiang.chen@linaro.org>
# Date 1321597186 -28800
# Node ID 2acc699d02b2c82a5a75fd3f559e031df5fbccce
# Parent  ec9d779f213dec72bc7e23f2244287e7920fbc2e
debug/gdb: Use the prebuilt zlib to build gdb cross
to remove the dependence on system zlib.

Reviewed-by: Michael Hope
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}" = "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]