* [zlib PATCH 3 of 3] debug/gdb: Use the prebuilt zlib to build gdb cross
@ 2011-11-22 12:12 Zhenqiang Chen
0 siblings, 0 replies; only message in thread
From: Zhenqiang Chen @ 2011-11-22 12:12 UTC (permalink / raw)
To: yann.morin.1998; +Cc: crossgcc
# 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-11-22 12:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-22 12:12 [zlib PATCH 3 of 3] debug/gdb: Use the prebuilt zlib to build gdb cross 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).