libtool-patches
[Top][All Lists]
Advanced

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

remove unneeded deplib loops


From: Peter O'Gorman
Subject: remove unneeded deplib loops
Date: Sun, 28 Aug 2005 22:56:09 +0900
User-agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317)

Hi,
In one of Ralf's massive speedup patches he removed a loop, this also removes that loop.

It also removes the now unnecessary loop to remove convenience libraries from deplibs. This loop was added because of the -all_load flag on darwin and now that there is no all_load flag on darwin it is no longer necessary.

The removal of these loops should speed up link times a little, but I don't have numbers.

Okay for HEAD?

Peter
2005-08-28  Peter O'Gorman  <address@hidden>
            Ralf Wildenhues  <address@hidden>

        * libltdl/config/ltmain.m4sh: Remove unnecessary deplib loops.

 
Index: libltdl/config/ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/config/ltmain.m4sh,v
retrieving revision 1.4
diff -u -3 -p -u -r1.4 ltmain.m4sh
--- libltdl/config/ltmain.m4sh  24 Aug 2005 15:57:32 -0000      1.4
+++ libltdl/config/ltmain.m4sh  28 Aug 2005 13:50:18 -0000
@@ -4967,17 +4967,6 @@ EOF
          $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> 
"$export_symbols"'
        fi
 
-       tmp_deplibs=
-       for test_deplib in $deplibs; do
-         case " $convenience " in
-         *" $test_deplib "*) ;;
-         *)
-           tmp_deplibs="$tmp_deplibs $test_deplib"
-           ;;
-         esac
-       done
-       deplibs="$tmp_deplibs"
-
        if test -n "$convenience"; then
          if test -n "$whole_archive_flag_spec"; then
            save_libobjs=$libobjs
@@ -6283,15 +6272,15 @@ fi\
          objlist=
          concat_cmds=
          save_oldobjs=$oldobjs
-         # Is there a better way of finding the last object in the list?
-         for obj in $save_oldobjs
+         for obj in $save_oldobjs last_oldobj
          do
-           last_oldobj=$obj
-         done
-         for obj in $save_oldobjs
-         do
-           oldobjs="$objlist $obj"
-           objlist="$objlist $obj"
+            case $obj in
+              last_oldobj) RANLIB=$save_RANLIB;;
+              *)
+               oldobjs="$objlist $obj"
+               objlist="$objlist $obj"
+                ;;
+            esac
            eval test_cmds=\"$old_archive_cmds\"
            if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
               test "$len" -le "$max_cmd_len"; then
@@ -6299,11 +6288,10 @@ fi\
            else
              # the above command should be used before it gets too long
              oldobjs=$objlist
-             if test "$obj" = "$last_oldobj" ; then
-               RANLIB=$save_RANLIB
-             fi
              test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-             eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+              if test -n "$oldobjs"; then
+               eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+              fi
              objlist=
            fi
          done

reply via email to

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