From 47f72fdba3f8b5d979802303f6d3c0312c931e7d Mon Sep 17 00:00:00 2001 From: Vladimir Mezentsev Date: Tue, 17 Jan 2023 18:53:38 -0800 Subject: [PATCH] Revert "gprofng: PR29987 bfd/archive.c:1447: undefined reference to `filename_ncmp'" This reverts commit c2a5d74050ea9d7897b4122ef57c627d395683b3. --- gprofng/Makefile.in | 1 + gprofng/configure | 11 +++++++++-- gprofng/configure.ac | 6 ++++++ gprofng/doc/Makefile.in | 1 + gprofng/gp-display-html/Makefile.in | 1 + gprofng/src/Makefile.am | 2 ++ gprofng/src/Makefile.in | 8 ++++++-- 7 files changed, 26 insertions(+), 4 deletions(-) diff --git a/gprofng/Makefile.in b/gprofng/Makefile.in index 3464b793813..01f7dca3f2a 100644 --- a/gprofng/Makefile.in +++ b/gprofng/Makefile.in @@ -267,6 +267,7 @@ FGREP = @FGREP@ GPROFNG_BROKEN_JAVAC = @GPROFNG_BROKEN_JAVAC@ GPROFNG_CFLAGS = @GPROFNG_CFLAGS@ GPROFNG_CPPFLAGS = @GPROFNG_CPPFLAGS@ +GPROFNG_LIBADD = @GPROFNG_LIBADD@ GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS = @GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS@ GPROFNG_NO_SWITCH_CFLAGS = @GPROFNG_NO_SWITCH_CFLAGS@ GREP = @GREP@ diff --git a/gprofng/configure b/gprofng/configure index bcf971b75fa..40604319dc9 100755 --- a/gprofng/configure +++ b/gprofng/configure @@ -665,6 +665,7 @@ BUILD_COLLECTOR_TRUE GPROFNG_NO_SWITCH_CFLAGS gprofng_cflags WERROR +GPROFNG_LIBADD CXXCPP OTOOL64 OTOOL @@ -12220,7 +12221,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12223 "configure" +#line 12224 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12326,7 +12327,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12329 "configure" +#line 12330 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15570,6 +15571,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +GPROFNG_LIBADD="-L../../libiberty -liberty" +if test "$enable_shared" = "yes"; then + GPROFNG_LIBADD="-L../../libiberty/pic -liberty" +fi + + # Figure out what compiler warnings we can enable. # See config/warnings.m4 for details. diff --git a/gprofng/configure.ac b/gprofng/configure.ac index 55312cab3f8..83e60a640cf 100644 --- a/gprofng/configure.ac +++ b/gprofng/configure.ac @@ -37,6 +37,12 @@ fi AC_DISABLE_SHARED LT_INIT +GPROFNG_LIBADD="-L../../libiberty -liberty" +if test "$enable_shared" = "yes"; then + GPROFNG_LIBADD="-L../../libiberty/pic -liberty" +fi +AC_SUBST(GPROFNG_LIBADD) + # Figure out what compiler warnings we can enable. # See config/warnings.m4 for details. diff --git a/gprofng/doc/Makefile.in b/gprofng/doc/Makefile.in index fd35f629403..a45018334e8 100644 --- a/gprofng/doc/Makefile.in +++ b/gprofng/doc/Makefile.in @@ -249,6 +249,7 @@ FGREP = @FGREP@ GPROFNG_BROKEN_JAVAC = @GPROFNG_BROKEN_JAVAC@ GPROFNG_CFLAGS = @GPROFNG_CFLAGS@ GPROFNG_CPPFLAGS = @GPROFNG_CPPFLAGS@ +GPROFNG_LIBADD = @GPROFNG_LIBADD@ GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS = @GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS@ GPROFNG_NO_SWITCH_CFLAGS = @GPROFNG_NO_SWITCH_CFLAGS@ GREP = @GREP@ diff --git a/gprofng/gp-display-html/Makefile.in b/gprofng/gp-display-html/Makefile.in index d2b9872fc71..42886f7c645 100644 --- a/gprofng/gp-display-html/Makefile.in +++ b/gprofng/gp-display-html/Makefile.in @@ -212,6 +212,7 @@ FGREP = @FGREP@ GPROFNG_BROKEN_JAVAC = @GPROFNG_BROKEN_JAVAC@ GPROFNG_CFLAGS = @GPROFNG_CFLAGS@ GPROFNG_CPPFLAGS = @GPROFNG_CPPFLAGS@ +GPROFNG_LIBADD = @GPROFNG_LIBADD@ GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS = @GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS@ GPROFNG_NO_SWITCH_CFLAGS = @GPROFNG_NO_SWITCH_CFLAGS@ GREP = @GREP@ diff --git a/gprofng/src/Makefile.am b/gprofng/src/Makefile.am index 2278b9a39bb..b802ffd39db 100644 --- a/gprofng/src/Makefile.am +++ b/gprofng/src/Makefile.am @@ -132,6 +132,8 @@ libgprofng_la_LDFLAGS = -version-info 0:0:0 # when -nostdlib is passed to libtool. # See bug 29364 - libgprofng.so: needs to link against -pthread libgprofng_la_LIBADD = $(top_builddir)/../opcodes/libopcodes.la \ + $(top_builddir)/../bfd/libbfd.la \ + $(GPROFNG_LIBADD) \ -lpthread -ldl dbedir = $(SYSCONFDIR) diff --git a/gprofng/src/Makefile.in b/gprofng/src/Makefile.in index 71dccf5f952..4274762334e 100644 --- a/gprofng/src/Makefile.in +++ b/gprofng/src/Makefile.in @@ -158,7 +158,9 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(dbedir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) -libgprofng_la_DEPENDENCIES = $(top_builddir)/../opcodes/libopcodes.la +am__DEPENDENCIES_1 = +libgprofng_la_DEPENDENCIES = $(top_builddir)/../opcodes/libopcodes.la \ + $(top_builddir)/../bfd/libbfd.la $(am__DEPENDENCIES_1) am__objects_1 = Application.lo BaseMetric.lo BaseMetricTreeNode.lo \ CallStack.lo CatchOutOfMemory.lo ClassFile.lo Command.lo \ CompCom.lo DataObject.lo DataSpace.lo Data_window.lo \ @@ -190,7 +192,6 @@ libgprofng_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ PROGRAMS = $(bin_PROGRAMS) am_gp_archive_OBJECTS = gp-archive.$(OBJEXT) ArchiveExp.$(OBJEXT) gp_archive_OBJECTS = $(am_gp_archive_OBJECTS) -am__DEPENDENCIES_1 = gp_archive_DEPENDENCIES = $(LIBGPROFNG) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_gp_collect_app_OBJECTS = gp-collect-app.$(OBJEXT) checks.$(OBJEXT) \ @@ -335,6 +336,7 @@ FGREP = @FGREP@ GPROFNG_BROKEN_JAVAC = @GPROFNG_BROKEN_JAVAC@ GPROFNG_CFLAGS = @GPROFNG_CFLAGS@ GPROFNG_CPPFLAGS = @GPROFNG_CPPFLAGS@ +GPROFNG_LIBADD = @GPROFNG_LIBADD@ GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS = @GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS@ GPROFNG_NO_SWITCH_CFLAGS = @GPROFNG_NO_SWITCH_CFLAGS@ GREP = @GREP@ @@ -554,6 +556,8 @@ libgprofng_la_LDFLAGS = -version-info 0:0:0 # when -nostdlib is passed to libtool. # See bug 29364 - libgprofng.so: needs to link against -pthread libgprofng_la_LIBADD = $(top_builddir)/../opcodes/libopcodes.la \ + $(top_builddir)/../bfd/libbfd.la \ + $(GPROFNG_LIBADD) \ -lpthread -ldl dbedir = $(SYSCONFDIR) -- 2.30.2