]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in (Piecewise linking): Add a clause to skip creating
authorRobert Boehne <rboehne@gnu.org>
Mon, 24 Jun 2002 19:32:41 +0000 (19:32 +0000)
committerRobert Boehne <rboehne@gnu.org>
Mon, 24 Jun 2002 19:32:41 +0000 (19:32 +0000)
the export file until the reloadable object file(s) have been
created, then use them as input for $export_symbols_cmds.

ChangeLog
ltmain.in

index 42e79ce2bf4c8b8d2010ccf15034dfe5636176cf..973ea1ad0df104680739bb1097af531dfd56482d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-06-24  Robert Boehne  <rboehne@gnu.org>
+
+       * ltmain.in (Piecewise linking): Add a clause to skip creating
+       the export file until the reloadable object file(s) have been
+       created, then use them as input for $export_symbols_cmds.
+
 2002-06-23  Albert Chin-A-Young  <china@thewrittenword.com>
 
        * ltdl.m4 (AC_LTDL_SYS_DLOPEN_DEPLIBS): Need to quote [ and ] for
index 4b05385bf68316b03357b4158bba8a76ffab38c8..d9b49856e5bb7e47da398b52c0e61ebece9c2739 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -3231,8 +3231,16 @@ EOF
            save_ifs="$IFS"; IFS='~'
            for cmd in $cmds; do
              IFS="$save_ifs"
-             $show "$cmd"
-             $run eval "$cmd" || exit $?
+             if len=`expr "X$cmd" : ".*"` &&
+              test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+               $show "$cmd"
+               $run eval "$cmd" || exit $?
+               skipped_export=false
+             else
+               # The command line is too long to execute in one step.
+               $show "using reloadable object file for export list..."
+               skipped_export=:
+             fi
            done
            IFS="$save_ifs"
            if test -n "$export_symbols_regex"; then
@@ -3317,7 +3325,7 @@ EOF
          deplibs="$save_deplibs"
        fi
 
-       if len=`expr "X$cmds" : ".*"` &&
+       if test "X$skipped_export" != "X:" && len=`expr "X$cmds" : ".*"` &&
           test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
          :
        else
@@ -3378,6 +3386,15 @@ EOF
          test -z "$concat_cmds" || concat_cmds=$concat_cmds~
          eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
 
+         if ${skipped_export-false}; then
+           $show "generating symbol list for \`$libname.la'"
+           export_symbols="$output_objdir/$libname.exp"
+           $run $rm $export_symbols
+           libobjs=$output
+           # Append the command to create the export file.
+           eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+          fi
+
          # Set up a command to remove the reloadale object files
          # after they are used.
          i=0