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>, GDB <gdb-patches at sourceware dot org>
- Date: Tue, 31 Mar 2015 15:01:00 +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>
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"
?
Thanks,
Pedro Alves