From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107139 invoked by alias); 30 Mar 2015 18:18:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 107121 invoked by uid 89); 30 Mar 2015 18:18:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Mar 2015 18:18:14 +0000 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1YceGI-0005Ua-Sj from Luis_Gustavo@mentor.com ; Mon, 30 Mar 2015 11:18:10 -0700 Received: from [172.30.0.5] (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.224.2; Mon, 30 Mar 2015 11:18:10 -0700 Message-ID: <5519935F.2070908@codesourcery.com> Date: Mon, 30 Mar 2015 18:18:00 -0000 From: Luis Machado Reply-To: User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "H.J. Lu" CC: Binutils , GDB Subject: Re: [PATCH 1/8] Add --with-system-zlib in bfd References: <1427730751.30498.4.camel@ubuntu-sellcey> <55197D8E.7070208@codesourcery.com> In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg01008.txt.bz2 On 03/30/2015 01:50 PM, H.J. Lu wrote: > On Mon, Mar 30, 2015 at 9:45 AM, Luis Machado wrote: >> On 03/30/2015 01:31 PM, H.J. Lu wrote: >>> >>> On Mon, Mar 30, 2015 at 8:52 AM, Steve Ellcey wrote: >>>> >>>> On Sun, 2015-03-29 at 07:10 -0700, H.J. Lu wrote: >>>>> >>>>> On Thu, Mar 26, 2015 at 8:57 AM, H.J. Lu wrote: >>>>>> >>>>>> I imported zlib from GCC. This patch adds --with-system-zlib and >>>>>> remove >>>>>> --with-zlib in bfd. OK for master? >>>> >>>> >>>> I think the global binutils-gdb Makefile needs to have a dependency of >>>> bfd on zlib. If I build 'all-binutils' (using just the binutils-gdb >>>> repository, not a combined tree with GCC) I get a build failure. If I >>>> explicitly build all-zlib before building all-binutils it works, but I >>>> should not have to do that. >>>> >>>> >>>> /bin/sh ./libtool --tag=CC --mode=link gcc -W -Wall -Wstrict-prototypes >>>> -Wmissing-prototypes -Wshadow -Werror >>>> -I/scratch/sellcey/repos/nightly/src/binutils-gdb/bfd/../zlib -g -O2 -rpath >>>> /scratch/sellcey/repos/nightly/install-mips-mti-linux-gnu/x86_64-unknown-linux-gnu/mips-mti-linux-gnu/lib >>>> -release `cat libtool-soversion` -static-libstdc++ -static-libgcc -o >>>> libbfd.la archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo >>>> coff-bfd.lo compress.lo corefile.lo format.lo hash.lo init.lo libbfd.lo >>>> linker.lo merge.lo opncls.lo reloc.lo section.lo simple.lo stab-syms.lo >>>> stabs.lo syms.lo targets.lo binary.lo ihex.lo srec.lo tekhex.lo verilog.lo >>>> `cat ofiles` -ldl -L../zlib -lz -ldl >>>> ./libtool: line 5195: cd: ../zlib: No such file or directory >>>> libtool: link: cannot determine absolute directory name of `../zlib' >>>> make[3]: *** [libbfd.la] Error 1 >>>> make[3]: Leaving directory >>>> `/scratch/sellcey/repos/nightly/obj-mips-mti-linux-gnu/binutils-gdb/bfd' >>>> make[2]: *** [all-recursive] Error 1 >>>> make[2]: Leaving directory >>>> `/scratch/sellcey/repos/nightly/obj-mips-mti-linux-gnu/binutils-gdb/bfd' >>>> make[1]: *** [all] Error 2 >>>> make[1]: Leaving directory >>>> `/scratch/sellcey/repos/nightly/obj-mips-mti-linux-gnu/binutils-gdb/bfd' >>>> make: *** [all-bfd] Error 2 >>>> Error: Make command failed, stopping build. >>> >>> >>> I will take a look. >>> >> >> It seems GDB's Makefile.in is also missing a few bits to make sure it >> includes ../zlib/libz.a in the final link step, otherwise it tries to pick >> the system's zlib instead of the included zlib, which may fail if you have >> an older libz installed. >> >> -- >> >> /usr/bin/ld: ../bfd/libbfd.a(compress.o): undefined reference to symbol >> 'compressBound@@ZLIB_1.2.0' >> //lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from >> command line >> collect2: error: ld returned 1 exit status >> make[2]: *** [gdb] Error 1 >> >> -- >> >> We need something like libiberty in gdb/Makefile.in, but conditionalized >> based on the configure switches to use the system's or the include zlib. >> > > Please check out users/hjl/zlib branch. > > That fixed it. Thanks, Luis