* [PARTIAL PATCH] gprofng vs zlib
@ 2022-04-05 19:09 Roland McGrath
2022-04-06 6:07 ` Vladimir Mezentsev
0 siblings, 1 reply; 2+ messages in thread
From: Roland McGrath @ 2022-04-05 19:09 UTC (permalink / raw)
To: Binutils
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?
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PARTIAL PATCH] gprofng vs zlib
2022-04-05 19:09 [PARTIAL PATCH] gprofng vs zlib Roland McGrath
@ 2022-04-06 6:07 ` Vladimir Mezentsev
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir Mezentsev @ 2022-04-06 6:07 UTC (permalink / raw)
To: binutils
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-06 6:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-05 19:09 [PARTIAL PATCH] gprofng vs zlib Roland McGrath
2022-04-06 6:07 ` Vladimir Mezentsev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).