+ if test "$with_gnu_ld" = yes; then
+ output=${output_objdir}/${output_la}.lnkscript
+ $echo "creating GNU ld script: $output"
+ $echo 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ $echo \""$obj"\" >> $output
+ done
+ $echo ')' >> $output
+ delfiles="$delfiles $output"
+ elif test "X$file_list_spec" != X; then
+ output=${output_objdir}/${output_la}.lnk
+ $echo "creating linker input file list: $output"
+ : > $output
+ for obj in $save_libobjs
+ do
+ $echo "$obj" >> $output
+ done
+ delfiles="$delfiles $output"
+ output=\"$file_list_spec$output\"
+ else
+ $echo "creating reloadable object files..."
+ output=$output_objdir/$save_output-${k}.$objext
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ eval test_cmds=\"$reload_cmds $objlist $last_robj\"
+ if test "X$objlist" = X ||
+ { len=`expr "X$test_cmds" : ".*"` &&
+ test $len -le $max_cmd_len; }; then
+ objlist="$objlist $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test $k -eq 1 ; then
+ # The first file doesn't have a previous command to add.
+ eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
+ fi
+ last_robj=$output_objdir/$save_output-${k}.$objext
+ k=`expr $k + 1`
+ output=$output_objdir/$save_output-${k}.$objext
+ objlist=$obj
+ len=1
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # 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\"
+
+ # Set up a command to remove the reloadale object files
+ # after they are used.
+ i=0
+ while test $i -lt $k
+ do
+ i=`expr $i + 1`
+ delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
+ done