This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH 1/8] Add --with-system-zlib in bfd
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Binutils <binutils at sourceware dot org>, GDB <gdb-patches at sourceware dot org>
- Date: Tue, 31 Mar 2015 03:46:37 -0700
- 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>
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
* Makefile.am (ZLIB): New.
(AM_CFLAGS): Add $(ZLIBINC).
(libbfd_la_LIBADD): Add $(ZLIB).
It is better for Makefile.am to use what configure.ac defines