[PATCH] PR28972, gprofng libraries should be installed under $(pkglibdir)

Vladimir Mezentsev vladimir.mezentsev@oracle.com
Tue Mar 22 04:56:45 GMT 2022



On 3/21/22 19:42, H.J. Lu wrote:
> This is the patch I am checking in.
>
> Thanks.
>
> -- H.J.

Hi H.J.,

The fix is wrong in gprofng/libcollector/Makefile.am:

% diff --git a/gprofng/libcollector/Makefile.am 
b/gprofng/libcollector/Makefile.am
index 901d9a5f0ee..ffb4f977aa5 100644
--- a/gprofng/libcollector/Makefile.am
+++ b/gprofng/libcollector/Makefile.am
@@ -54,7 +54,7 @@ myinclude_HEADERS = 
$(srcdir)/../../include/collectorAPI.h \
      $(srcdir)/../../include/libcollector.h \
      $(srcdir)/../../include/libfcollector.h

-lib_LTLIBRARIES = libgp-collector.la libgp-collectorAPI.la libgp-heap.la \
+pkglib_LTLIBRARIES = libgp-collector.la libgp-collectorAPI.la 
libgp-heap.la \
      libgp-sync.la libgp-iotrace.la

  libgp_collector_la_SOURCES = $(CSOURCES)
@@ -77,3 +77,7 @@ libgp_iotrace_la_LDFLAGS = $(AM_LDFLAGS)
  libgp_collectorAPI_la_SOURCES = collectorAPI.c
  libgp_collectorAPI_la_LIBADD = -lc -ldl

+.PHONY: install-data-local
+
+install-data-local: install-pkglibLTLIBRARIES
+    rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a



We may not remove libgp-collectorAPI.a, libgp-collectorAPI.a and the 
library that was built in the gprofng/src directory (libgprofng.la).

The following fix was in In my patch:

+.PHONY: install-data-local
+
+install-data-local: install-pkglibLTLIBRARIES
+    for f in libgp-collector libgp-heap libgp-sync libgp-iotrace ; do \
+      rm -f $(DESTDIR)/$(pkglibdir)/$$f.la 
$(DESTDIR)/$(pkglibdir)/$$f.a ; \
+    done
+


-Vladimir



More information about the Binutils mailing list