libtool-patches
[Top][All Lists]
Advanced

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

Re: piecewise linking with linear space complexity


From: Ralf Wildenhues
Subject: Re: piecewise linking with linear space complexity
Date: Mon, 23 Jul 2007 19:47:44 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Hi Gary,

* Gary V. Vaughan wrote on Fri, Jul 20, 2007 at 09:03:01PM CEST:
> On Jul 18, 2007, at 4:35 PM, Ralf Wildenhues wrote:
>>
>> I'm currently testing the patch below.  OK to apply (if it shows
>> no problems)?
>
> Since it is fixing a bug, then yes, as long as testing doesn't reveal
> any regressions, please apply.

Thanks for the review.  I noted that I had should have escaped $RM in
the eval statements.  Done and applied as below.

Cheers,
Ralf

2007-07-23  Ralf Wildenhues  <address@hidden>

        * 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 <address@hidden>.

Index: libltdl/config/ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/config/ltmain.m4sh,v
retrieving revision 1.88
diff -u -r1.88 ltmain.m4sh
--- libltdl/config/ltmain.m4sh  23 Jul 2007 12:23:27 -0000      1.88
+++ libltdl/config/ltmain.m4sh  23 Jul 2007 17:45:31 -0000
@@ -6170,7 +6170,7 @@
                  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 @@
              # 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 @@
              # 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" &&




reply via email to

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