This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Re: binutils version of snapshot builds


Joseph S. Myers schrieb:
> On Wed, 21 Mar 2007, Matthias Klose wrote:
>> Unrelated to your patch: Building the snapshot using an earlier snapshot having
>> the same sonames for the shared libraries fails with an as segfault for the
>> first file in opcodes. This could be avoided including the date string in the
>> soversion (bfd/configure.in). Are there reasons against this configuration
>> (besides ending up with a version string "2.17.50.20070321.20070321")?
> 
> I think having 2.17.50.20070321 in the SONAME is reasonable.

changed in the attached patch. the version string doesn't duplicate the date.
checked with a snapshot and a release build.

  Matthias

bfd/

2007-03-21  Matthias Klose  <doko@ubuntu.com>

	* Makefile.am(libopcodes_la_LDFLAGS): Use bfd soversion.
	* Makefile.in: Regenerate.

opcodes/

2007-03-21  Matthias Klose  <doko@ubuntu.com>

	* Makefile.am(libbfd_la_LDFLAGS): Use bfd soversion,
	(bfdver.h): Use date for non-release builds in soversion.
	* Makefile.in: Regenerate.

--- binutils-2.17.20070321cvs.orig/opcodes/Makefile.am
+++ binutils-2.17.20070321cvs/opcodes/Makefile.am
@@ -361,7 +361,7 @@
 # if host != build.
 libopcodes_la_DEPENDENCIES = $(OFILES)
 libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@
-libopcodes_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
+libopcodes_la_LDFLAGS = -release `cat ../bfd/libtool-soversion` @WIN32LDFLAGS@
 
 # libtool will build .libs/libopcodes.a.  We create libopcodes.a in
 # the build directory so that we don't have to convert all the
--- binutils-2.17.20070321cvs.orig/bfd/Makefile.am
+++ binutils-2.17.20070321cvs/bfd/Makefile.am
@@ -745,7 +745,7 @@
 libbfd_la_SOURCES = $(BFD32_LIBS_CFILES)
 libbfd_la_DEPENDENCIES = $(OFILES) ofiles
 libbfd_la_LIBADD = `cat ofiles` @WIN32LIBADD@
-libbfd_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
+libbfd_la_LDFLAGS = -release `cat libtool-soversion` @WIN32LDFLAGS@
 
 # libtool will build .libs/libbfd.a.  We create libbfd.a in the build
 # directory so that we don't have to convert all the programs that use
@@ -961,18 +961,20 @@
 CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
 	stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
 
-DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES)
+DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES) libtool-soversion
 
 bfdver.h: $(srcdir)/version.h $(srcdir)/Makefile.in
 	@-test -d doc || mkdir doc
 	@echo "creating $@ and doc/bfdver.texi"
 	@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_version_package="\"$(PKGVERSION)\"" ;\
 	report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
 	if test "x$(RELEASE)" = x ; 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}" ;\
 	fi ;\
 	sed -e "s,@bfd_version@,$$bfd_version," \
 	    -e "s,@bfd_version_string@,$$bfd_version_string," \
@@ -984,7 +986,8 @@
 	 echo "@set UPDATED `date '+%B %Y'`" >> doc/bfdver.texi; \
 	 if [ -n "$(REPORT_BUGS_TEXI)" ]; then \
 	   echo "@set BUGURL $(REPORT_BUGS_TEXI)" >> doc/bfdver.texi; \
-	 fi
+	 fi; \
+	echo "$${bfd_soversion}" > libtool-soversion
 
 # What appears below is generated by a hacked mkdep using gcc -MM.
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]