Alexandre: You have my approval to un-do my mistsake. If I had understood exactly what this patch was doing then I would have rejected it myself. H.J. As I now understand it, your patch doesn't improve anything, it just breaks static linking (where you'd actually need the dependent archive). When linking shared the archive is already pulled into the *.so, so it isn't actually dependent on the archive.
- Robert Alexandre Oliva wrote: > On Oct 23, 2001, Robert Boehne <[EMAIL PROTECTED]> wrote: > > > Here is the patch reworked for HEAD. If noone objects > > I'll commit it. > > *wakes up* > *stretches* > *yawns* > *looks around* > > *thinks* > > -- Hmm... It's been a long time since I last posted in > libtool-patches. In fact, it's been a while since I last opened > its mail folder, so I had completely missed this one. I wonder if > it's too late... > > *shouts* > > -- OBJECTION! > > *looks at the CVS repo* > *thinks* > > -- Hmm... No, it *was* too late :-( > > Oh, well. I really think this shouldn't have gone in, for the reasons > brought up in gcc-patches and libtool mailing lists. But, after such > a long silence, I don't feel I'm entitled to just come back and start > checking in or reverting patches, so... Ok to revert that patch, by > checking this one in? Tested on athlon-pc-linux-gnu, no regressions, > so this must be right for at least GNU/Linux/x86, right? ;-) > > For the record, the reason is that, contrary to the claim in the > patch, on a number of OSs it's not safe to link a static library into > a shared library and, on those in which it is safe, using file_magic > is pointless: pass_all is supposed to behave exactly the way > H.J. intended. > > Sorry for having dropped the ball for so long. It's too bad I don't > foresee this changing in the near future :-( > > ------------------------------------------------------------------------ > Index: ChangeLog > from Alexandre Oliva <[EMAIL PROTECTED]> > > Reverted incorrect patch: > 2001-10-24 H.J. Lu <[EMAIL PROTECTED]> > * ltmain.sh: Allow link against an archive when building a > shared library. > * libtool.m4 (lt_cv_deplibs_check_method): Always use > file_magic for Linux ELF. > > Index: ltmain.in > =================================================================== > RCS file: /cvsroot/libtool/libtool/ltmain.in,v > retrieving revision 1.286 > diff -u -p -r1.286 ltmain.in > --- ltmain.in 29 Jan 2002 22:58:35 -0000 1.286 > +++ ltmain.in 7 Feb 2002 06:58:05 -0000 > @@ -2990,13 +2990,6 @@ EOF > *) potlib=`$echo "X$potlib" | $Xsed -e >'s,[^/]*$,,'`"$potliblink";; > esac > done > - # It is ok to link against an archive when > - # building a shared library. > - if $AR -t $potlib > /dev/null 2>&1; then > - newdeplibs="$newdeplibs $a_deplib" > - a_deplib="" > - break 2 > - fi > if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ > | ${SED} 10q \ > | egrep "$file_magic_regex" > /dev/null; then > Index: libtool.m4 > =================================================================== > RCS file: /cvsroot/libtool/libtool/libtool.m4,v > retrieving revision 1.247 > diff -u -p -r1.247 libtool.m4 > --- libtool.m4 30 Jan 2002 16:39:24 -0000 1.247 > +++ libtool.m4 7 Feb 2002 06:58:08 -0000 > @@ -1949,7 +1949,6 @@ linux*) > # glibc up to 2.1.1 does not perform some relocations on ARM > lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared >object|dynamic lib )' ;; > esac > - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared >object|dynamic lib )' > lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` > ;; > > > ------------------------------------------------------------------------ > > -- > 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 Professional serial bug killer -- Robert Boehne Software Engineer Ricardo Software Chicago Technical Center TEL: (630)789-0003 x. 238 FAX: (630)789-0127 email: [EMAIL PROTECTED] _______________________________________________ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool