From: Luis Machado <lgustavo@codesourcery.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Binutils <binutils@sourceware.org>, GDB <gdb-patches@sourceware.org>
Subject: Re: [PATCH 1/8] Add --with-system-zlib in bfd
Date: Mon, 30 Mar 2015 18:18:00 -0000 [thread overview]
Message-ID: <5519935F.2070908@codesourcery.com> (raw)
In-Reply-To: <CAMe9rOp_RvPPu4HuQDzcH5DwsRs5ViBW=5G5zOC0uvvmu-A25g@mail.gmail.com>
On 03/30/2015 01:50 PM, H.J. Lu wrote:
> On Mon, Mar 30, 2015 at 9:45 AM, Luis Machado <lgustavo@codesourcery.com> wrote:
>> On 03/30/2015 01:31 PM, H.J. Lu wrote:
>>>
>>> On Mon, Mar 30, 2015 at 8:52 AM, Steve Ellcey <sellcey@imgtec.com> 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 <hjl.tools@gmail.com> 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
next prev parent reply other threads:[~2015-03-30 18:18 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-26 15:57 H.J. Lu
2015-03-29 14:10 ` H.J. Lu
2015-03-30 15:52 ` Steve Ellcey
2015-03-30 16:32 ` H.J. Lu
2015-03-30 16:45 ` Luis Machado
2015-03-30 16:51 ` H.J. Lu
2015-03-30 17:13 ` Steve Ellcey
2015-03-30 17:21 ` H.J. Lu
2015-03-30 17:36 ` Steve Ellcey
2015-03-30 19:33 ` Antoine Tremblay
2015-03-30 19:37 ` Antoine Tremblay
2015-03-31 17:13 ` Antoine Tremblay
2015-03-31 17:16 ` H.J. Lu
2015-03-31 17:18 ` Antoine Tremblay
2015-03-31 18:55 ` H.J. Lu
2015-03-31 20:16 ` H.J. Lu
2015-04-01 12:18 ` Antoine Tremblay
2015-04-02 3:22 ` Bin.Cheng
2015-04-02 3:53 ` Bin.Cheng
2015-03-30 20:19 ` H.J. Lu
2015-03-31 12:08 ` Antoine Tremblay
2015-03-30 18:18 ` Luis Machado [this message]
2015-03-30 17:20 ` H.J. Lu
2015-03-31 6:13 ` Mike Frysinger
2015-03-31 10:10 ` H.J. Lu
2015-03-31 10:37 ` Pedro Alves
2015-03-31 10:46 ` H.J. Lu
2015-03-31 10:53 ` Pedro Alves
2015-03-31 11:33 ` H.J. Lu
2015-03-31 11:46 ` Pedro Alves
2015-03-31 12:01 ` H.J. Lu
2015-03-31 12:15 ` Pedro Alves
2015-03-31 13:43 ` H.J. Lu
2015-03-31 13:46 ` Pedro Alves
2015-03-31 16:41 ` Mike Frysinger
2015-03-31 16:56 ` H.J. Lu
2015-03-31 17:01 ` Mike Frysinger
2015-03-31 17:04 ` H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5519935F.2070908@codesourcery.com \
--to=lgustavo@codesourcery.com \
--cc=binutils@sourceware.org \
--cc=gdb-patches@sourceware.org \
--cc=hjl.tools@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox