libtool-patches
[Top][All Lists]
Advanced

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

RE: FYI: duplicate removal patch [Was Re: ok, new libtool for cyg winup


From: Robert Boehne
Subject: RE: FYI: duplicate removal patch [Was Re: ok, new libtool for cyg winupdates]
Date: Wed, 04 Apr 2001 18:00:29 -0500

After installing the attached patch (simply reverts the changes
to ltmain.in) my project is building better, but not quite right.
For some reason, this patch removes all redundant dependency libs
except for -lm.  In the 10th library built (deplibs from 9 others)
there are about a hundred -lm options in the lib*.la file.
Does anyone know why it won't remove "-lm" but removes others
just fine?

Robert

-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  address@hidden
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/ltmain.in,v
retrieving revision 1.200.2.55
diff -u -r1.200.2.55 ltmain.in
--- ltmain.in   2001/04/01 14:28:18     1.200.2.55
+++ ltmain.in   2001/04/04 22:56:40
@@ -2360,11 +2360,25 @@
          vars="compile_deplibs finalize_deplibs"
        fi
        for var in $vars dependency_libs; do
-         # Add libraries to $var in reverse order
+         # Make sure that $var contains only unique libraries
+         # and add them in reverse order
          eval tmp_libs=\"\$$var\"
          new_libs=
          for deplib in $tmp_libs; do
-           new_libs="$deplib $new_libs"
+           case $deplib in
+           -L*) new_libs="$deplib $new_libs" ;;
+           *)
+             case " $specialdeplibs " in
+             *" $deplib "*) new_libs="$deplib $new_libs" ;;
+             *)
+               case " $new_libs " in
+               *" $deplib "*) ;;
+               *) new_libs="$deplib $new_libs" ;;
+               esac
+               ;;
+             esac
+             ;;
+           esac
          done
          tmp_libs=
          for deplib in $new_libs; do

reply via email to

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