summaryrefslogtreecommitdiff
path: root/build-aux/ltmain.in
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2015-10-04 21:55:03 +0200
committerPavel Raiskup <praiskup@redhat.com>2015-10-12 19:21:33 +0200
commit32f0df9835ac15ac17e04be57c368172c3ad1d19 (patch)
treee68bace94ffd423ff0bde382d6fa9a7760469930 /build-aux/ltmain.in
parentb7b6ec33baa4747eb147e9e249e675e477d861f4 (diff)
downloadlibtool-32f0df9835ac15ac17e04be57c368172c3ad1d19.tar.gz
libtool: mitigate the $sed_quote_subst slowdown
When it is reasonably possible, use shell implementation for quoting. References: http://lists.gnu.org/archive/html/libtool/2015-03/msg00005.html http://lists.gnu.org/archive/html/libtool/2015-02/msg00000.html https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20006 * gl/build-aux/funclib.sh (func_quote): New function that can be used as substitution for '$SED $sed_quote_subst' call. * build-aux/ltmain.in (func_emit_wrapper): Use func_quote instead of '$SED $sed_quote_subst'. (func_mode_link): Likewise. * NEWS: Document. * bootstrap: Sync with funclib.sh.
Diffstat (limited to 'build-aux/ltmain.in')
-rw-r--r--build-aux/ltmain.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 0c40da06..24acefd5 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -3346,7 +3346,8 @@ else
if test \"\$libtool_execute_magic\" != \"$magic\"; then
file=\"\$0\""
- qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+ func_quote "$ECHO"
+ qECHO=$func_quote_result
$ECHO "\
# A function that is used when there is no print builtin or printf.
@@ -8596,8 +8597,8 @@ EOF
relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
fi
done
- relink_command="(cd `pwd`; $relink_command)"
- relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ func_quote "(cd `pwd`; $relink_command)"
+ relink_command=$func_quote_result
fi
# Only actually do things if not in dry run mode.
@@ -8843,7 +8844,8 @@ EOF
done
# Quote the link command for shipping.
relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ func_quote "$relink_command"
+ relink_command=$func_quote_result
if test yes = "$hardcode_automatic"; then
relink_command=
fi