libtool-patches
[Top][All Lists]
Advanced

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

FYI: Libtool max_cmd_len change.


From: Robert Boehne
Subject: FYI: Libtool max_cmd_len change.
Date: Wed, 28 Nov 2001 17:01:51 -0600

Hello,

In the HEAD branch, Libtool calculates the maximum usable command
line length and multiplies it by 0.75 for a factor of safety.
Note, it isn't reasonable to calculate this with any accuracy
without attempting libtool's internally generated commands and
then rewriting them if the command exceeds the limit.
Also, C++ compilers add on many options and pass to ld, often
these additions cause the compiler's internal invocation of
ld to fail, so we don't really have control over this.
  I have been having problems with this on an OSF/1 4.0f
Alpha and found that increasing the factor of saftey from
1/4 to 1/2 (or is it from 1.5 to 2 ?) solves the problem
in my case.  The only thing that did fix it was to edit
the generated libtool script's max_cmd_len and change it
to 16000 which was almost exactly what this patch will
return in that instance.
  I seriously doubt that anyone has much to say about this
because I'm probably the only one who's using the piecewise
linking on a daily basis, so I'm taking the liberty of checking
this in.

ChangeLog entry:
2001-11-27  Robert Boehne  <address@hidden>

        * libtool.m4 (AC_LIBTOOL_SYS_MAX_CMD_LEN): Change the
        factor of saftey as 3/4 of the result was not low enough.
                                                                                
   

Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.244
diff -u -r1.244 libtool.m4
--- libtool.m4  2001/11/27 18:49:47     1.244
+++ libtool.m4  2001/11/28 22:50:55
@@ -604,11 +604,10 @@
       testring=$testring$testring
     done
     testring=
-    # add a significant safety factor because C++ compilers can tack on
massive
-    # amounts of additional arguments before passing them to the
linker.  1/4
-    # should be good.
-    len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len`
+    # Add a significant safety factor because C++ compilers can tack on
massive
+    # amounts of additional arguments before passing them to the
linker.
+    # It appears as though 1/2 is a usable value.
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
     ;;
   esac
 ])     

                                                                                
                                                         
-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  address@hidden



reply via email to

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