Re: [PATCH] Add --with-system-zlib in gdb

Pedro Alves
2015-03-31T15:11:08Z

On 03/31/2015 03:56 PM, H.J. Lu wrote:
> On Tue, Mar 31, 2015 at 7:01 AM, Pedro Alves <palves@redhat.com> wrote:
>> On 03/31/2015 02:46 PM, H.J. Lu wrote:
>>> --- a/gdb/acinclude.m4
>>> +++ b/gdb/acinclude.m4
>>> @@ -467,7 +467,11 @@ AC_DEFUN([GDB_AC_CHECK_BFD], [
>>> CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
>>> LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
>>> intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
>>> - LIBS="-lbfd -liberty $intl $LIBS"
>>> + if test -f ../zlib/Makefile; then
>>> + LIBS="-lbfd -L../zlib -lz -liberty $intl $LIBS"
>>> + else
>>> + LIBS="-lbfd -lz -liberty $intl $LIBS"
>>> + fi
>>
>> Seems quite fragile to have to configure and generate the zlib
>> Makefile first. Why isn't this simply:
>>
>> LDFLAGS="-L../bfd -L../libiberty $zlibdir $LDFLAGS"
>>
>> ?
>
> It works. Here is the updated patch for gdb. OK for master?

OK.

Thanks,
Pedro Alves