[PARTIAL PATCH] gprofng vs zlib

Vladimir Mezentsev vladimir.mezentsev@oracle.com
Wed Apr 6 06:07:08 GMT 2022



On 4/5/22 12:09, Roland McGrath via Binutils wrote:
> The new gprofng subdirectory doesn't quite follow the binutils norms
> for configuring its library dependencies.
> I suspect it would be fixed by the patch below, but I'm not set up
> with all the matching autoconf/automake
> versions to do the regeneration properly.  Can someone get the working
> version of this fixed checked in?

Thank you Roland.
I will do it.

-Vladimir

>
>
> Thanks,
> Roland
>
>
> diff --git a/gprofng/configure.ac b/gprofng/configure.ac
> index 95bffe0e4e2..3071f8d9434 100644
> --- a/gprofng/configure.ac
> +++ b/gprofng/configure.ac
> @@ -182,6 +182,8 @@ fi`
>   ])
>   AM_CONDITIONAL(TCL_TRY, test "${ac_cv_libctf_tcl_try}" = yes)
>
> +AM_ZLIB
> +
>
>   # Generate manpages, if possible.
>   if test $cross_compiling = no; then
> @@ -220,4 +222,3 @@ AC_CONFIG_FILES([Makefile src/Makefile gp-display-html/Make$
>   AC_CONFIG_HEADERS([config.h:common/config.h.in])
>
>   AC_OUTPUT
> -
> diff --git a/gprofng/src/Makefile.am b/gprofng/src/Makefile.am
> index 4c5a836b3fd..819cda3fd53 100644
> --- a/gprofng/src/Makefile.am
> +++ b/gprofng/src/Makefile.am
> @@ -98,10 +98,16 @@ CSOURCES = \
>
>   LIBGPROFNG = libgprofng.la
>
> +# This is where we get zlib from.  zlibdir is -L../zlib and zlibinc is
> +# -I../zlib, unless we were configured with --with-system-zlib, in which
> +# case both are empty.
> +ZLIB = @zlibdir@ -lz
> +ZLIBINC = @zlibinc@
> +
>   AM_CPPFLAGS = $(GPROFNG_CPPFLAGS) -DLOCALEDIR=\"@localedir@\" -I.. -I$(srcdir)$
>          -I$(srcdir)/../common \
>          -I$(srcdir)/../../include -I$(srcdir)/../../opcodes \
> -       -I../../bfd -I$(srcdir)/../../bfd
> +       -I../../bfd -I$(srcdir)/../../bfd $(ZLIBINC)
>   AM_CFLAGS = $(GPROFNG_CFLAGS) $(PTHREAD_CFLAGS) \
>          $(GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS) \
>          $(GPROFNG_NO_SWITCH_CFLAGS)
> @@ -133,19 +139,19 @@ dbe_DATA = $(srcdir)/gprofng.rc
>   bin_PROGRAMS = gp-archive gp-collect-app gprofng gp-display-text gp-display-sr$
>
>   gp_archive_SOURCES = gp-archive.cc ArchiveExp.cc
> -gp_archive_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK)
> +gp_archive_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB)
>
>   gp_collect_app_SOURCES = gp-collect-app.cc checks.cc envsets.cc count.cc
>   gp_collect_app_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK)
>
>   gprofng_SOURCES = gprofng.cc
> -gprofng_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK)
> +gprofng_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB)
>
>   gp_display_src_SOURCES = gp-display-src.cc
> -gp_display_src_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK)
> +gp_display_src_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB)
>
>   gp_display_text_SOURCES = gp-display-text.cc ipc.cc ipcio.cc
> -gp_display_text_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK)
> +gp_display_text_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB)
>
>
>   if BUILD_MAN



More information about the Binutils mailing list