]> git.ipfire.org Git - thirdparty/libtool.git/commit
libtool: speed up ltwrapper_script detection in execute mode
authorPeter Rosin <peda@lysator.liu.se>
Mon, 5 May 2014 22:03:19 +0000 (00:03 +0200)
committerPeter Rosin <peda@lysator.liu.se>
Mon, 5 May 2014 22:03:19 +0000 (00:03 +0200)
commitda30ce4dc9554c80f1931600af2b8bbab486476e
treef8c5ce9c72a894d97dce17158e3859d70fca4732
parent5911665520a53415bafd8bb6da9989b5fe25df80
libtool: speed up ltwrapper_script detection in execute mode

Execute mode is slow and might even DOS the computer in extreme
cases when a parameter is a big binary file without newlines.
Work around this with different truncation if a suitable dd
utility is found.

Fixes bug#13472 and bug#16662.

Reported by Pavel Raiskup and Nick Bowler.

* m4/libtool.m4 (_LT_PATH_DD): New macro, for finding a dd utility
that works for the below purpose.
(_LT_CMD_TRUNCATE): New macro, for finding out how to truncate binary
pipes (fallback to the old sed truncation if no suitable dd is found
in _LT_PATH_DD).
(_LT_SETUP): Require _LT_CMD_TRUNCATE.
(LT_INIT): Require Autoconf 2.62, as needed by _LT_PATH_DD.
* build_aux/ltmain.in (func_lalib_p): Factor out the actual "generated
by libtool" test into...
(func_generated_by_libtool_p): ...this new function...
(func_ltwrapper_script_p): ...so that it can be reused here, when
truncating the pipe according to _LT_CMD_TRUNCATE.
* THANKS: Update.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
THANKS
build-aux/ltmain.in
m4/libtool.m4