This is the mail archive of the
binutils@sourceware.org
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: Binutils <binutils at sourceware dot org>, GDB <gdb-patches at sourceware dot org>
- Date: Tue, 31 Mar 2015 10:04:04 -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> <20150331164107 dot GI25224 at vapier> <CAMe9rOqu5SJnRKdMGgsA6HQmEqAg6vUrd-AvEHPayfnk9JKPGg at mail dot gmail dot com> <20150331170122 dot GJ25224 at vapier>
On Tue, Mar 31, 2015 at 10:01 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> On 31 Mar 2015 09:56, H.J. Lu wrote:
>> On Tue, Mar 31, 2015 at 9:41 AM, Mike Frysinger wrote:
>> > On 31 Mar 2015 03:10, 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/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.
>> >> >> -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").
>> >>
>> >> That is what gcc/configure.ac has and it works for me.
>> >
>> > then gcc/configure.ac is also broken. whether "it works for me" is
>> > irrelevant -- simply read the code and you'll see it's wrong. if you
>> > pass --without-system-zlib the code wrongly behaves as if you passed
>> > --with-system-zlib.
>> >
>> > i mention this because it is breaking my test builds. not that that
>> > really matters -- the code is clearly incorrect.
>>
>> We should fix zlib.m4 and use it in gcc/configure.ac.
>
> sure; i await your patches ;). i'm not trying to point fingers here for
> pointing's sake -- binutils & gdb were working before and now they're broken,
> and they broke due to the zlib patches you merged. so i think it's reasonable
> to expect you to drive further fixes (probably across gcc) even though the bug
> has existed in gcc for sometime.
Sure. I have put it in my queue.
Sorry for the inconvenience.
--
H.J.