]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/config/ltmain.m4sh (func_mode_link): Remove each
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 23 Jul 2007 17:46:28 +0000 (17:46 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 23 Jul 2007 17:46:28 +0000 (17:46 +0000)
intermediate relinked object after use, to avoid quadratic space
complexity when linking partially.
Report by Isidor Zeuner <eezyy@gmx.net>.

ChangeLog
libltdl/config/ltmain.m4sh

index f44b972a3c9ccf46f21c414c66063cb0d9c56af8..eb2bf3e4611c04c6c63039c2b35aa2e5e4df0236 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-07-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * libltdl/config/ltmain.m4sh (func_mode_link): Remove each
+       intermediate relinked object after use, to avoid quadratic space
+       complexity when linking partially.
+       Report by Isidor Zeuner <eezyy@gmx.net>.
+
 2007-07-23  Eric Blake  <ebb9@byu.net>
 
        * libltdl/config/ltmain.m4sh: Whitespace cleanup.
index 896c387c25e88645c9a4460c79ceee11833a31f6..73470fcae045d75f8f87feab6436a3aec367cd04 100644 (file)
@@ -6170,7 +6170,7 @@ EOF
                  else
                    # All subsequent reloadable object files will link in
                    # the last one created.
-                   eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
+                   eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
                  fi
                  last_robj=$output_objdir/$output_la-${k}.$objext
                  k=`expr $k + 1`
@@ -6183,16 +6183,9 @@ EOF
              # reloadable object file.  All subsequent reloadable object
              # files will link in the last one created.
              test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-             eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+             eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj~\$RM $last_robj\"
+             delfiles="$delfiles $output"
 
-             # Set up a command to remove the reloadable object files
-             # after they are used.
-             i=0
-             while test "$i" -lt "$k"
-             do
-               i=`expr $i + 1`
-               delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
-             done
            else
              output=
            fi
@@ -6205,6 +6198,9 @@ EOF
              # Append the command to create the export file.
              test -z "$concat_cmds" || concat_cmds=$concat_cmds~
              eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+             if test -n "$output"; then
+               eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+             fi
            fi
 
            test -n "$save_libobjs" &&