bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] 1.5.14: Incorrect archive member renaming with GNU ar


From: Ralf Wildenhues
Subject: Re: [patch] 1.5.14: Incorrect archive member renaming with GNU ar
Date: Thu, 7 Apr 2005 22:58:28 +0200
User-agent: Mutt/1.5.6+20040907i

* Peter O'Gorman wrote on Thu, Apr 07, 2005 at 03:04:17PM CEST:
> Peter O'Gorman wrote:
> | Maciej W. Rozycki wrote:
> | |
> | |  A change dated 2004-12-10 broke handling of archives containing multiple
> | | members of the same name for GNU binutils.  Unlike what the relevant
*snip*
> |
> | Aw crap! Oh well, Alexandre Olivia has a patch, applied to gcc, that avoids
> | putting duplicate members in the archive in the first place. Seems like a
> | good plan. I'll go look for it.
> 
> This is Alexandre Oliva's patch with a test case. OK to apply to branch-1-5
> and forward port?

Yes.  Please show the forward-port, though.  Nice and clean fix, BTW.

May I suggest to add the additional step below to the test, to link
another convenience lib into the convenience lib?

Regards,
Ralf


--- tests/duplicate_members.test        2005-04-07 22:55:42.380753315 +0200
+++ tests/duplicate_members.test        2005-04-07 22:53:14.450335507 +0200
@@ -17,7 +17,7 @@
 cd duplicate_members.dir
 chmod +x ./libtool
 
-for a in 1 2 3 4 5
+for a in 1 2 3 4 5 6
 do
   mkdir $a
   echo "int foo$a() {return $a;}" > $a/a.c
@@ -28,12 +28,14 @@
 do
   ./libtool --mode=compile --tag=CC $CC -c $CFLAGS -o $a/a.lo $a/a.c
 done
+./libtool --mode=compile --tag=CC $CC -c $CFLAGS -o 6/a.lo 6/a.c
 
-./libtool --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libconv.la 1/a.lo 
2/a.lo 3/a.lo 4/a.lo 5/a.lo
+./libtool --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libc0.la 6/a.lo
+./libtool --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libconv.la 1/a.lo 
2/a.lo 3/a.lo 4/a.lo 5/a.lo libc0.la
 
 cat <<EOF > bar.c
 int bar() {
-    int result=foo1() +foo2() +foo3() +foo4() +foo5();
+    int result=foo1() +foo2() +foo3() +foo4() +foo5() + foo6();
     return result;
 }
 EOF
@@ -45,7 +47,7 @@
 int bar();
 int main()
 {
-if (bar() == 15) return 0;
+if (bar() == 21) return 0;
 return 1;
 }
 EOF




reply via email to

[Prev in Thread] Current Thread [Next in Thread]