From ec76f6e000bdfdc91f4b5da7fa05c57a39cc3f27 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sat, 22 Apr 2017 09:03:47 +0200 Subject: Add application script, and a Makefile --- patches/max_cmd_len/1.5.14 | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 patches/max_cmd_len/1.5.14 (limited to 'patches/max_cmd_len/1.5.14') diff --git a/patches/max_cmd_len/1.5.14 b/patches/max_cmd_len/1.5.14 new file mode 100644 index 0000000..8f299e8 --- /dev/null +++ b/patches/max_cmd_len/1.5.14 @@ -0,0 +1,33 @@ +--- ltmain.sh ++++ ltmain.sh +@@ -136,6 +136,30 @@ + lo2o="s/\\.lo\$/.${objext}/" + o2lo="s/\\.${objext}\$/.lo/" + quote_scanset='[[~#^*{};<>?'"'"' ]' ++ ++if test -z "$max_cmd_len"; then ++ i=0 ++ testring="ABCD" ++ new_result= ++ ++ # If test is not a shell built-in, we'll probably end up computing a ++ # maximum length that is only half of the actual maximum length, but ++ # we can't tell. ++ while (test "X"`$SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \ ++ = "XX$testring") >/dev/null 2>&1 && ++ new_result=`expr "X$testring" : ".*" 2>&1` && ++ max_cmd_len="$new_result" && ++ test "$i" != 17 # 1/2 MB should be enough ++ do ++ i=`expr $i + 1` ++ 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. ++ # It appears as though 1/2 is a usable value. ++ max_cmd_len=`expr $max_cmd_len \/ 2` ++fi + + ##################################### + # Shell function definitions: -- cgit v1.2.3-65-gdbad