From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5398 invoked by alias); 22 Nov 2011 12:12:37 -0000 Received: (qmail 5385 invoked by uid 22791); 22 Nov 2011 12:12:34 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-iy0-f169.google.com (HELO mail-iy0-f169.google.com) (209.85.210.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Nov 2011 12:12:02 +0000 Received: by iaek3 with SMTP id k3so145582iae.0 for ; Tue, 22 Nov 2011 04:12:02 -0800 (PST) Received: by 10.231.67.6 with SMTP id p6mr4582250ibi.24.1321963921984; Tue, 22 Nov 2011 04:12:01 -0800 (PST) Received: from [192.168.0.100] ([122.84.23.42]) by mx.google.com with ESMTPS id eh34sm59302590ibb.5.2011.11.22.04.11.59 (version=SSLv3 cipher=OTHER); Tue, 22 Nov 2011 04:12:01 -0800 (PST) Message-ID: <4ECB9189.9020304@linaro.org> Date: Tue, 22 Nov 2011 12:12:00 -0000 From: Zhenqiang Chen User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: yann.morin.1998@anciens.enib.fr CC: crossgcc@sourceware.org Subject: [zlib PATCH 3 of 3] debug/gdb: Use the prebuilt zlib to build gdb cross Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org X-SW-Source: 2011-11/txt/msg00124.txt.bz2 # HG changeset patch # User Zhenqiang Chen # 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 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