libtool-patches
[Top][All Lists]
Advanced

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

Re: PATCH: Piecewise linking and export_symbols_cmds


From: Boehne, Robert
Subject: Re: PATCH: Piecewise linking and export_symbols_cmds
Date: Mon, 10 Jun 2002 13:55:36 -0500

Gary,

Here's an updated patch that addresses your concerns.
See what you think of it.

Robert

-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  rboehne AT ricardo-us DOT com

Index: ChangeLog
===================================================================
RCS file: /cvsroot/libtool/libtool/ChangeLog,v
retrieving revision 1.1115
diff -u -r1.1115 ChangeLog
--- ChangeLog   1 Jun 2002 14:54:51 -0000       1.1115
+++ ChangeLog   3 Jun 2002 14:47:34 -0000
@@ -1,3 +1,9 @@
+2002-06-03  Robert Boehne  <address@hidden>
+
+       * 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-01  Gary V. Vaughan  <address@hidden>
 
        * tests/pdemo-exec.test: Typo.  s/hell-static/hell_static/
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/ltmain.in,v
retrieving revision 1.297
diff -u -r1.297 ltmain.in
--- ltmain.in   21 May 2002 14:05:20 -0000      1.297
+++ ltmain.in   3 Jun 2002 14:47:35 -0000
@@ -3231,8 +3231,16 @@
            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 @@
          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
@@ -3377,6 +3385,15 @@
          # 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\"
+
+         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.

reply via email to

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