libtool-patches
[Top][All Lists]
Advanced

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

Re: Silence errors when expr command-line exceeds command-line length li


From: Ralf Wildenhues
Subject: Re: Silence errors when expr command-line exceeds command-line length limit
Date: Fri, 5 Aug 2005 09:53:50 +0200
User-agent: Mutt/1.4.1i

Hi Albert,

* Albert Chin wrote on Thu, Aug 04, 2005 at 11:21:50PM CEST:
> AIX sends messages like "/bin/expr: Arg list too long" to stderr.
> These should be ignored. Patch attached against CVS head.

Yep.  I had this in my speed-up patches, too, but forgot to apply this
separately when they were rejected.

Committed to all three branches.  I also added another two cases where
the error might show up, see below.

Thanks,
Ralf

2005-08-05  Albert Chin-A-Young  <address@hidden>

        * config/ltmain.m4sh (func_mode_link): Ignore errors from expr
        when determining if piece-wise linking should be done.

Index: config/ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/config/ltmain.m4sh,v
retrieving revision 1.78
diff -u -r1.78 ltmain.m4sh
--- config/ltmain.m4sh  4 Aug 2005 13:50:18 -0000       1.78
+++ config/ltmain.m4sh  5 Aug 2005 07:45:31 -0000
@@ -5073,7 +5073,8 @@
          fi
        fi
 
-       if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
+       if test "X$skipped_export" != "X:" &&
+          len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
           test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
          :
        else
@@ -5132,7 +5133,7 @@
            do
              eval test_cmds=\"$reload_cmds $objlist $last_robj\"
              if test "X$objlist" = X ||
-                { len=`expr "X$test_cmds" : ".*"` &&
+                { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
                   test "$len" -le "$max_cmd_len"; }; then
                objlist="$objlist $obj"
              else
@@ -6345,8 +6346,8 @@
        fi
        eval cmds=\"$old_archive_cmds\"
 
-       if len=`expr "X$cmds" : ".*"` &&
-            test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+       if len=`expr "X$cmds" : ".*" 2>/dev/null` &&
+          test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
          cmds=$old_archive_cmds
        else
          # the command line is too long to link in one step, link in parts
@@ -6366,7 +6367,7 @@
            oldobjs="$objlist $obj"
            objlist="$objlist $obj"
            eval test_cmds=\"$old_archive_cmds\"
-           if len=`expr "X$test_cmds" : ".*"` &&
+           if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
               test "$len" -le "$max_cmd_len"; then
              :
            else




reply via email to

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