diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2004-02-11 19:33:14 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2004-02-11 19:33:14 +0000 |
commit | ca265f67234eac84d34231038220347b088ac6f3 (patch) | |
tree | f04f1e86e7fe9609040f3418d4993e519ec84bc4 | |
parent | fixed to set correct stack sizes for x86 and amd64. (diff) | |
download | historical-ca265f67234eac84d34231038220347b088ac6f3.tar.gz historical-ca265f67234eac84d34231038220347b088ac6f3.tar.bz2 historical-ca265f67234eac84d34231038220347b088ac6f3.zip |
Add max_cmd_len patch
-rw-r--r-- | eclass/ELT-patches/max_cmd_len/1.5.0 | 33 | ||||
-rw-r--r-- | eclass/libtool.eclass | 12 |
2 files changed, 43 insertions, 2 deletions
diff --git a/eclass/ELT-patches/max_cmd_len/1.5.0 b/eclass/ELT-patches/max_cmd_len/1.5.0 new file mode 100644 index 000000000000..6d5f88b59669 --- /dev/null +++ b/eclass/ELT-patches/max_cmd_len/1.5.0 @@ -0,0 +1,33 @@ +--- ltmain.sh 2004-02-11 20:55:14.587581248 +0200 ++++ ltmain.sh 2004-02-11 21:15:33.467283368 +0200 +@@ -117,6 +117,30 @@ + execute_dlfiles= + lo2o="s/\\.lo\$/.${objext}/" + o2lo="s/\\.${objext}\$/.lo/" ++ ++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: diff --git a/eclass/libtool.eclass b/eclass/libtool.eclass index f9de39db6258..f2b9f535f2e1 100644 --- a/eclass/libtool.eclass +++ b/eclass/libtool.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.24 2004/01/02 21:54:28 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.25 2004/02/11 19:33:14 azarah Exp $ # # Author: Martin Schlemmer <azarah@gentoo.org> # @@ -110,7 +110,7 @@ elibtoolize() { local do_only_patches="no" local deptoremove= local my_dirlist= - local elt_patches="portage relink sed test tmp" + local elt_patches="portage relink max_cmd_len sed test tmp" my_dirlist="$(ELT_find_ltmain_sh)" @@ -177,6 +177,14 @@ elibtoolize() { ret=$? fi ;; + "max_cmd_len") + # Do not apply if $max_cmd_len is not used ... + if [ -n "$(grep 'max_cmd_len' "${x}/ltmain.sh")" ] + then + ELT_walk_patches "${x}/ltmain.sh" "${y}" + ret=$? + fi + ;; *) ELT_walk_patches "${x}/ltmain.sh" "${y}" ret=$? |