This is the mail archive of the binutils@sources.redhat.com 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]

Re: Archive library breakage on standard UNIX systems with ranlib


On Sep  2, 2000, msokolov@ivan.Harhan.ORG (Michael Sokolov) wrote:

> The current libtool, both -rHEAD and -rmulti-language-branch, ever
> since 1999- 10-01 in fact, causes catastrophic breakage on standard
> UNIX systems on which archives created by ar MUST be ranlib'ed
> before ld can use them at all (at least 4.0BSD through 4.3BSD, and
> lots of others I'm sure). I have traced the breakage down to this
> change:

Please try the patch in the attached message.  I'm checking it in the
libtool CVS tree right now, and I'll update libtool in the binutils
and GCC CVS trees shortly thereafter.



It seems to me that -current libtool has lost the ability to run
ranlib when creating static libraries.  I added back the lines from a
previous versions, see patch at end.  Is there any reason for not
calling ranlib?  Not using ranlib does make static libraries not work
on some platforms, for example OpenBSD/i386.  Any comments?

/assar

2000-08-13  Assar Westerlund  <assar@sics.se>

	* ltconfig.in: add back ranlib calls for static libraries if there
	is a ranlib

Index: ltconfig.in
===================================================================
RCS file: /home/cvs/libtool/ltconfig.in,v
retrieving revision 1.275
diff -u -w -u -w -r1.275 ltconfig.in
--- ltconfig.in	2000/07/24 06:15:50	1.275
+++ ltconfig.in	2000/08/13 20:59:05
@@ -526,6 +528,11 @@
 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
 old_postinstall_cmds='chmod 644 $oldlib'
 old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+fi
 
 # Set sane defaults for various variables
 test -z "$AR" && AR=ar





-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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