This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add --with-system-zlib in gdb
- From: Pedro Alves <palves at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GDB <gdb-patches at sourceware dot org>
- Date: Tue, 31 Mar 2015 16:11:02 +0100
- Subject: Re: [PATCH] Add --with-system-zlib in gdb
- Authentication-results: sourceware.org; auth=none
- References: <20150331112712 dot GA22591 at gmail dot com> <20150331115151 dot GA25736 at gmail dot com> <CAMe9rOoR1Dqp+mdVQg9PyPLeNkEwP8iPYRfNW=PnSnezd_4Ebw at mail dot gmail dot com> <551AA89C dot 1050604 at redhat dot com> <CAMe9rOrGomkR8PcQCoVbfstx8Wi8B9DuPD8wy4q0X_FUHiV0wg at mail dot gmail dot com>
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