This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
libctf linking against different libbfd builds, but using the same soname
- From: Matthias Klose <doko at ubuntu dot com>
- To: binutils <binutils at sourceware dot org>, Nick Alcock <nick dot alcock at oracle dot com>
- Date: Fri, 22 Nov 2019 06:00:22 +0100
- Subject: libctf linking against different libbfd builds, but using the same soname
Nick,
I made a first attempt at packaging binutils trunk and libctf. Two new shared
libraries are installed, libctf and libctf-nobfd. libctf-nobfd is the same
library for native builds, and for builds targeting other architectures, however
the libctf builds are differing, because they link to different libbfd
libraries. The packages for Debian/Ubuntu are built with the attached patch,
and setting BFD_SOVER_EXT to "-system" for native builds, and to
"-$(TARGET_ARCH)" for cross binutils. Ending up now with conflicting sonames
for the native and cross libctf builds. Now I think I should extend the patch
below to encode the same information into the libctf soname, so that I am able
to distinguish between the native and the various cross builds. Is this correct,
or can you discard the cross libctf builds and use the native build instead?
The other question I didn't look into detail yet: Does the linking of libctf
against libbfd change any of the libctf ABI?
Matthias
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -958,14 +958,14 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/
@echo "creating $@"
@bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
bfd_version_string="\"$(VERSION)\"" ;\
- bfd_soversion="$(VERSION)" ;\
+ bfd_soversion="$(VERSION)$(BFD_SOVER_EXT)" ;\
bfd_version_package="\"$(PKGVERSION)\"" ;\
report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
. $(srcdir)/development.sh ;\
if test "$$development" = true ; then \
bfd_version_date=`$(SED) -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\
- bfd_soversion="$(VERSION).$${bfd_version_date}" ;\
+ bfd_soversion="$(VERSION)$(BFD_SOVER_EXT).$${bfd_version_date}" ;\
fi ;\
$(SED) -e "s,@bfd_version@,$$bfd_version," \
-e "s,@bfd_version_string@,$$bfd_version_string," \
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -2076,14 +2076,14 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/
@echo "creating $@"
@bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
bfd_version_string="\"$(VERSION)\"" ;\
- bfd_soversion="$(VERSION)" ;\
+ bfd_soversion="$(VERSION)$(BFD_SOVER_EXT)" ;\
bfd_version_package="\"$(PKGVERSION)\"" ;\
report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
. $(srcdir)/development.sh ;\
if test "$$development" = true ; then \
bfd_version_date=`$(SED) -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\
- bfd_soversion="$(VERSION).$${bfd_version_date}" ;\
+ bfd_soversion="$(VERSION)$(BFD_SOVER_EXT).$${bfd_version_date}" ;\
fi ;\
$(SED) -e "s,@bfd_version@,$$bfd_version," \
-e "s,@bfd_version_string@,$$bfd_version_string," \