From: Ralf Wildenhues Date: Mon, 23 Jul 2007 17:46:28 +0000 (+0000) Subject: * libltdl/config/ltmain.m4sh (func_mode_link): Remove each X-Git-Tag: release-2-1b~91 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be2de7379017698f38524c9109e3720d7a868094;p=thirdparty%2Flibtool.git * 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 . --- diff --git a/ChangeLog b/ChangeLog index f44b972a3..eb2bf3e46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-07-23 Ralf Wildenhues + + * 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 . + 2007-07-23 Eric Blake * libltdl/config/ltmain.m4sh: Whitespace cleanup. diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index 896c387c2..73470fcae 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -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" &&