This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/8] Add --with-system-zlib in bfd

On Tue, Mar 31, 2015 at 3:53 AM, Pedro Alves <> wrote:
> On 03/31/2015 11:46 AM, H.J. Lu wrote:
>> On Tue, Mar 31, 2015 at 3:37 AM, Pedro Alves <> wrote:
>>> On 03/31/2015 11:10 AM, H.J. Lu wrote:
>>>> On Mon, Mar 30, 2015 at 11:13 PM, Mike Frysinger <> wrote:
>>>>> On 26 Mar 2015 08:57, H.J. Lu wrote:
>>>>>> --- a/bfd/
>>>>>> +++ b/bfd/
>>>>>> -# Link in zlib if we can.  This allows us to read compressed debug sections.
>>>>>> -# This is used only by compress.c.
>>>>>> -AM_ZLIB
>>>>>> +# Use the system's zlib library.
>>>>>> +zlibdir=-L../zlib
>>>>>> +zlibinc="-I\$(srcdir)/../zlib"
>>>>>> +AC_ARG_WITH(system-zlib,
>>>>>> +[AS_HELP_STRING([--with-system-zlib], [use installed libz])],
>>>>>> +zlibdir=
>>>>>> +zlibinc=
>>>>>> +)
>>>>> 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").
>>>>> -mike
>>>> That is what gcc/ 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 isn't complete. I also needed to change
> Never said it was complete.
>> * (ZLIB): New.
>> (ZLIBINC): Likewise.
>> (libbfd_la_LIBADD): Add $(ZLIB).
>> It is better for to use what defines
> That's orthogonal.  How defines what
> 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 bits
> everywhere.

They aren't the same.  Some tools like ld, which use zlib implicitly
via libfd and libtool, don't need to reference zlib.  Some only need
to reference zlib library.  Some only need to reference header.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]