This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-4.1.2 RC1 build problem
- From: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- To: Kate Minola <kate01123 at gmail dot com>
- Cc: gcc at gcc dot gnu dot org, mark at codesourcery dot com, gcc-patches at gcc dot gnu dot org
- Date: Sat, 3 Feb 2007 03:02:15 +0100
- Subject: Re: gcc-4.1.2 RC1 build problem
- References: <9c27041b0702020637o2f571985m176400a7c1f85bc@mail.gmail.com>
Hello Kate, all,
* Kate Minola wrote on Fri, Feb 02, 2007 at 03:37:05PM CET:
>
> echo 'SYSTEM_HEADER_DIR="'"`echo /usr/include | sed -e :a -e
> "s,[^/]*/\.\.\/,,"
> -e ta`"'"' \
> >
> /home/kate/gcc-4.1.2-20070128/alpha-OSF1-V4/lib/gcc/alphaev56-
> dec-osf4.0f/4.1.2/install-tools/mkheaders.conf
> /bin/sh: : cannot execute
> /bin/sh: /]*/../,, -e ta: not found
> sed: Function s,[ cannot be parsed.
> make[2]: *** [install-mkheaders] Error 1
> make[2]: Leaving directory
> `/home/kate/gcc-4.1.2-20070128/src/obj-alpha-OSF1-V4/
> gcc'
The macro $(SYSTEM_HEADER_DIR) is used in a double-quoted context,
leading to nonportable "...`..."..."...`...", see
<http://www.gnu.org/software/autoconf/manual/html_node/Shell-Substitutions.html>.
Proposed untested patch. (I also haven't checked whether there are
other instances of this issue in 'make install' code.)
Cheers,
Ralf
gcc/ChangeLog:
2007-02-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
PR other/27843
* Makefile.in (SYSTEM_HEADER_DIR): Use single quotes to avoid
nested double- and backquotes.
Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in (revision 121494)
+++ gcc/Makefile.in (working copy)
@@ -386,7 +386,9 @@
# Purge it of unneccessary internal relative paths
# to directories that might not exist yet.
# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
-SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
+# Use single quotes here to avoid nested double- and backquotes, this
+# macro is also used in a double-quoted context.
+SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`
# Control whether to run fixproto and fixincludes.
STMP_FIXPROTO = @STMP_FIXPROTO@