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

Pedro Alves
2015-03-31T14:01:16Z

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