2007-06-01 Steve Ellcey <sje@cup.hp.com>
* libltdl/m4/libtool.m4 (LT_CMD_MAX_LEN): Try using getconf to set lt_cv_sys_max_cmd_len.
This commit is contained in:
parent
fa7ccaf7e5
commit
350c058541
|
@ -1,3 +1,8 @@
|
||||||
|
2007-06-01 Steve Ellcey <sje@cup.hp.com>
|
||||||
|
|
||||||
|
* libltdl/m4/libtool.m4 (LT_CMD_MAX_LEN): Try using getconf
|
||||||
|
to set lt_cv_sys_max_cmd_len.
|
||||||
|
|
||||||
2007-05-31 Paolo Bonzini <bonzini@gnu.org>
|
2007-05-31 Paolo Bonzini <bonzini@gnu.org>
|
||||||
|
|
||||||
* ltgcc.m4: Update from GCC.
|
* ltgcc.m4: Update from GCC.
|
||||||
|
|
|
@ -1439,29 +1439,35 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# Make teststring a little bigger before we do anything with it.
|
lt_cv_sys_max_cmd_len=`getconf ARG_MAX 2> /dev/null`
|
||||||
# a 1K string should be a reasonable start.
|
if test -n $lt_cv_sys_max_cmd_len; then
|
||||||
for i in 1 2 3 4 5 6 7 8 ; do
|
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
|
||||||
teststring=$teststring$teststring
|
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
|
||||||
done
|
else
|
||||||
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
|
# Make teststring a little bigger before we do anything with it.
|
||||||
# If test is not a shell built-in, we'll probably end up computing a
|
# a 1K string should be a reasonable start.
|
||||||
# maximum length that is only half of the actual maximum length, but
|
for i in 1 2 3 4 5 6 7 8 ; do
|
||||||
# we can't tell.
|
teststring=$teststring$teststring
|
||||||
while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
|
done
|
||||||
= "XX$teststring$teststring"; } >/dev/null 2>&1 &&
|
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
|
||||||
test $i != 17 # 1/2 MB should be enough
|
# If test is not a shell built-in, we'll probably end up computing a
|
||||||
do
|
# maximum length that is only half of the actual maximum length, but
|
||||||
i=`expr $i + 1`
|
# we can't tell.
|
||||||
teststring=$teststring$teststring
|
while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
|
||||||
done
|
= "XX$teststring$teststring"; } >/dev/null 2>&1 &&
|
||||||
# Only check the string length outside the loop.
|
test $i != 17 # 1/2 MB should be enough
|
||||||
lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
|
do
|
||||||
teststring=
|
i=`expr $i + 1`
|
||||||
# Add a significant safety factor because C++ compilers can tack on massive
|
teststring=$teststring$teststring
|
||||||
# amounts of additional arguments before passing them to the linker.
|
done
|
||||||
# It appears as though 1/2 is a usable value.
|
# Only check the string length outside the loop.
|
||||||
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
|
lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
|
||||||
|
teststring=
|
||||||
|
# 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`
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
])
|
])
|
||||||
|
|
Loading…
Reference in New Issue