[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Speeding up libtool
From: |
Ralf Wildenhues |
Subject: |
Re: Speeding up libtool |
Date: |
Wed, 6 Apr 2005 00:11:26 +0200 |
User-agent: |
Mutt/1.5.6+20040907i |
* Ralf Wildenhues wrote on Mon, Apr 04, 2005 at 09:06:25AM CEST:
> * Robert Ögren wrote on Mon, Apr 04, 2005 at 01:30:26AM CEST:
> >
> > With ash and lt_ECHO=printf...:
> > I think the disappointing speedup is caused by a lot of spawning of
> > printf (printf isn't a builtin in ash, right?) Setting ECHO=echo in
> > config.status makes it take 5.7 seconds after the patch (8.2 before).
>
> ash's `echo' is bad for libtool, as it interprets backslashes by
> default. The ash I use on linux has printf builtin. I looked on
> cygwin.com, they seem to ship an older ash variant without printf
> builtin. You may want to try a newer one or even try to get them to
> include it in cygwin proper.
I checked a cygwin installation. The /bin/sh had no builtin printf, but
its builtin echo does _not_ interpret backslashes, so it's actually
usable for libtool.
CONFIG_SHELL=/bin/sh /bin/sh configure
should thus work. Sorry for not checking earlier.
Meaning 40% speedup for config.status on cygwin. :)
I get about 30% on linux/x86.
OK to apply to HEAD?
Regards,
Ralf
* m4/libtool.m4 (_LT_CONFIG_COMMANDS): Only call sed if
necessary while quoting all libtool variables.
Reported by Robert Ögren <address@hidden>.
Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.177
diff -u -r1.177 libtool.m4
--- m4/libtool.m4 28 Mar 2005 09:32:59 -0000 1.177
+++ m4/libtool.m4 28 Mar 2005 16:00:34 -0000
@@ -462,12 +462,26 @@
# Quote evaled strings.
for var in lt_decl_all_varnames([[ ]], lt_decl_quote_varnames); do
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e
\\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e
\\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
done
# Double-quote double-evaled strings.
for var in lt_decl_all_varnames([[ ]], lt_decl_dquote_varnames); do
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e
\\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e
\\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e
\\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e
\\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
done
# Fix-up fallback echo if it was mangled by the above quoting rules.
- Re: Speeding up libtool,
Ralf Wildenhues <=