This is the mail archive of the
gcc-regression@gcc.gnu.org
mailing list for the GCC project.
Re: GCC build failed with your patch.
> Date: Mon, 31 Jul 2000 18:26:07 -0700
> From: Zack Weinberg <zack@wolery.cumb.org>
> Cc: aoliva@redhat.com, jakub@redhat.com, gcc-regression@gcc.gnu.org
> +qCXX_FOR_TARGET=`expr "x$CXX_FOR_TARGET" : 'x\(.*\)' | sed 's,&,\\\&,g'`
I think this change is so that things like
CXX_FOR_TARGET='cd foo && cxx'
work. Mind, I don't see why it shouldn't apply to all variables;
don't we already have some quoting mechanism for sed replacements in
autoconf?
Anyway, I found the problem:
[geoffk@sloth build]$ /usr/ucb/expr 'xyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' : 'x\(.*\)'
expr: Paren problem
There are just about 129 characters in the first argument, a very
suspicious number. It seems to be some kind of limit, in
/usr/ucb/expr on Solaris 2.6, on the maximum length of a string that
can be matched by "\(.*\)".
Alexandre, why did you use this complicated expr construction rather
than a simple
echo "$CXX_FOR_TARGET" | sed 's,&,\\\&,g'
I've fixed this for the automated tester, by putting /usr/bin first in
the path where it should be anyway. However, it turns out that SunOS
has exactly the same problem in /usr/bin/expr, so it will still need
to be fixed.
--
- Geoffrey Keating <geoffk@cygnus.com>