This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: sed: command garbled
- To: Phil Edwards <pedwards at disaster dot jaj dot com>
- Subject: Re: sed: command garbled
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 03 Aug 2000 20:51:07 -0300
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <200008032317.TAA07975@disaster.jaj.com>
On Aug 3, 2000, Phil Edwards <pedwards@disaster.jaj.com> wrote:
>> What do you get for CXX_FOR_TARGET in the top-level Makefile?
> This is going to be horribly linewrapped...
Thanks. It's right (for some value of right that doesn't match
Solaris' /bin/sh's expectations :-)
> If CONFIG_SHELL is set to bash v2, it works. With sh and ksh (the
> POSIX sh on Solaris), it fails.
I should have known better. I had forgot CXX_FOR_TARGET was evaluated
within double-quotes. The following patch carefully avoids using
double quotes without losing in safety. (for those who didn't know, a
shell variable after `case' isn't broken into works)
I'm checking this in as an obvious (at least to me) bug fix. Tested
on i686-pc-linux-gnu and sparc-sun-solaris2.6.
Index: ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* configure.in (libstdcxx_flags): Don't use `"'.
Index: configure.in
===================================================================
RCS file: /cvs/gcc/egcs/configure.in,v
retrieving revision 1.59
diff -u -r1.59 configure.in
--- configure.in 2000/08/03 01:56:16 1.59
+++ configure.in 2000/08/03 23:45:04
@@ -51,7 +51,7 @@
if [ "${enable_libstdcxx_v3}" = "yes" ] && test -d $srcdir/libstdc++-v3; then
libstdcxx_version="target-libstdc++-v3"
# Don't use libstdc++-v3's flags to configure/build itself.
- libstdcxx_flags='`test "x$$dir" != xlibstdc++-v3 && test -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/mkcheck && $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/mkcheck 2 $$r/$(TARGET_SUBDIR)/libstdc++-v3 $$s/libstdc++-v3 | sed -e "s/-I/-isystem /g"` -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src/.libs'
+ libstdcxx_flags='`case $$dir in libstdc++-v3) ;; *) test -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/mkcheck && $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/mkcheck 2 $$r/$(TARGET_SUBDIR)/libstdc++-v3 $$s/libstdc++-v3 | sed -e '"'s/-I/-isystem /g'"' ;; esac` -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src/.libs'
else
libstdcxx_version="target-libio target-libstdc++"
libstdcxx_flags='-isystem $$s/libstdc++ -isystem $$s/libstdc++/std -isystem $$s/libstdc++/stl -isystem $$s/libio/ -isystem $$s/libio/stdio -L$$r/$(TARGET_SUBDIR)/libstdc++'
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me