This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH 1/8] Add --with-system-zlib in bfd
- From: Pedro Alves <palves at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>, GDB <gdb-patches at sourceware dot org>
- Date: Tue, 31 Mar 2015 11:53:37 +0100
- Subject: Re: [PATCH 1/8] Add --with-system-zlib in bfd
- Authentication-results: sourceware.org; auth=none
- References: <20150326155711 dot GA10088 at gmail dot com> <20150331061337 dot GA30996 at vapier> <CAMe9rOpRauO-5fxuV5bZkUC0tMbbi0tCTCmGQ0GEe1NXEa1dYw at mail dot gmail dot com> <551A78D4 dot 7050804 at redhat dot com> <CAMe9rOomwTtSiSS1K1zQpGvpArqZLDfOyapDVvC=Yfy5m3zBEg at mail dot gmail dot com>
On 03/31/2015 11:46 AM, H.J. Lu wrote:
> On Tue, Mar 31, 2015 at 3:37 AM, Pedro Alves <email@example.com> wrote:
>> On 03/31/2015 11:10 AM, H.J. Lu wrote:
>>> On Mon, Mar 30, 2015 at 11:13 PM, Mike Frysinger <firstname.lastname@example.org> wrote:
>>>> On 26 Mar 2015 08:57, H.J. Lu wrote:
>>>>> --- a/bfd/configure.ac
>>>>> +++ b/bfd/configure.ac
>>>>> -# Link in zlib if we can. This allows us to read compressed debug sections.
>>>>> -# This is used only by compress.c.
>>>>> +# Use the system's zlib library.
>>>>> +[AS_HELP_STRING([--with-system-zlib], [use installed libz])],
>>>> this is wrong. the 3rd arg is whether the option was specified, not that the
>>>> option was disabled. you need to check $withval is equal to "no" (or not equal
>>>> to "yes").
>>> That is what gcc/configure.ac has and it works for me.
>> Why are we patching every tool's configury instead of tweaking
>> config/zlib.m4 (where AM_ZLIB is from)? We go from a single
>> place to edit, to the same configure bits spread around the
>> tree. Seems like a step backwards.
> Replace AM_ZLIB in configure.ac isn't complete. I also needed to change
Never said it was complete.
> * Makefile.am (ZLIB): New.
> (ZLIBINC): Likewise.
> (AM_CFLAGS): Add $(ZLIBINC).
> (libbfd_la_LIBADD): Add $(ZLIB).
> It is better for Makefile.am to use what configure.ac defines
That's orthogonal. How configure.ac defines what Makefile.am
consumes is the issue. That can either be through a shared macro,
which makes sure all tools have the exact same command line option
(like AM_ZLIB), or you manually put the same configure.ac bits