Commit eeae7b41 by Daniel Jacobowitz Committed by Daniel Jacobowitz

configure.in (TOPLEVEL_CONFIGURE_ARGUMENTS, baseargs): Fix quoting.

./	* configure.in (TOPLEVEL_CONFIGURE_ARGUMENTS, baseargs): Fix
	quoting.
	* configure: Regenerated.
gcc/
	* configure.in: Quote gcc_config_arguments for configargs.h.
	* configure: Regenerated.
	* gccbug.in: Don't shell-expand gcc_config_arguments.

From-SVN: r71474
parent 99edd65d
2003-09-17 Daniel Jacobowitz <drow@mvista.com>
* configure.in (TOPLEVEL_CONFIGURE_ARGUMENTS, baseargs): Fix
quoting.
* configure: Regenerated.
2003-09-16 Joel Brobecker <brobecker@gnat.com> 2003-09-16 Joel Brobecker <brobecker@gnat.com>
* MAINTAINERS (Write After Approval): Add myself to write after * MAINTAINERS (Write After Approval): Add myself to write after
......
...@@ -67,19 +67,13 @@ progname=$0 ...@@ -67,19 +67,13 @@ progname=$0
if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
# Export original configure arguments for use by sub-configures. These # Export original configure arguments for use by sub-configures. These
# will be expanded once by make, and once by the shell, so they need to # will be expanded by make, so quote '$'.
# have '$' quoted for make, and then each argument quoted for the shell. tmp="$progname $@"
# What's more, the 'echo' below might expand backslashes. sed -e 's,\$,$$,g' <<EOF_SED > conftestsed.out
cat <<\EOF_SED > conftestsed $tmp
s,\\,\\\\,g; s,\$,$$,g
EOF_SED EOF_SED
tmp="'$progname'" TOPLEVEL_CONFIGURE_ARGUMENTS=`cat conftestsed.out`
for ac_arg rm -f conftestsed.out
do
tmp="$tmp '"`echo "$ac_arg" | sed -f conftestsed`
done
rm -f conftestsed
TOPLEVEL_CONFIGURE_ARGUMENTS="$tmp"
AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS) AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS)
moveifchange=${srcdir}/move-if-change moveifchange=${srcdir}/move-if-change
...@@ -1766,7 +1760,7 @@ AC_SUBST_FILE(serialization_dependencies) ...@@ -1766,7 +1760,7 @@ AC_SUBST_FILE(serialization_dependencies)
# Base args. Strip norecursion, cache-file, srcdir, host, build, # Base args. Strip norecursion, cache-file, srcdir, host, build,
# target and nonopt. These are the ones we might not want to pass # target and nonopt. These are the ones we might not want to pass
# down to subconfigures. # down to subconfigures. These will be expanded by make, so quote '$'.
cat <<\EOF_SED > conftestsed cat <<\EOF_SED > conftestsed
s/ --no[[^ ]]* / / s/ --no[[^ ]]* / /
s/ --c[[a-z-]]*[[= ]][[^ ]]* / / s/ --c[[a-z-]]*[[= ]][[^ ]]* / /
...@@ -1781,10 +1775,13 @@ s/ -build[[= ]][[^ ]]* / / ...@@ -1781,10 +1775,13 @@ s/ -build[[= ]][[^ ]]* / /
s/ -target[[= ]][[^ ]]* / / s/ -target[[= ]][[^ ]]* / /
s/ [[^' -][^ ]*] / / s/ [[^' -][^ ]*] / /
s/^ *//;s/ *$// s/^ *//;s/ *$//
s,\\,\\\\,g; s,\$,$$,g s,\$,$$,g
EOF_SED
sed -f conftestsed <<EOF_SED > conftestsed.out
${ac_configure_args}
EOF_SED EOF_SED
baseargs=`echo " ${ac_configure_args} " | sed -f conftestsed` baseargs=`cat conftestsed.out`
rm -f conftestsed rm -f conftestsed conftestsed.out
# For the build-side libraries, we just need to pretend we're native, # For the build-side libraries, we just need to pretend we're native,
# and not use the same cache file. Multilibs are neither needed nor # and not use the same cache file. Multilibs are neither needed nor
......
2003-09-17 Daniel Jacobowitz <drow@mvista.com>
* configure.in: Quote gcc_config_arguments for configargs.h.
* configure: Regenerated.
* gccbug.in: Don't shell-expand gcc_config_arguments.
2003-09-17 Gabriel Dos Reis <gdr@integrable-solutions.net> 2003-09-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/11357 PR c++/11357
......
...@@ -1180,9 +1180,18 @@ if test -f configargs.h ; then ...@@ -1180,9 +1180,18 @@ if test -f configargs.h ; then
else else
gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
fi fi
# Double all backslashes and backslash all quotes to turn
# gcc_config_arguments into a C string.
sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
$gcc_config_arguments
EOF
gcc_config_arguments_str=`cat conftest.out`
rm -f conftest.out
cat > configargs.h <<EOF cat > configargs.h <<EOF
/* Generated automatically. */ /* Generated automatically. */
static const char configuration_arguments[] = "$gcc_config_arguments"; static const char configuration_arguments[] = "$gcc_config_arguments_str";
static const char thread_model[] = "$thread_file"; static const char thread_model[] = "$thread_file";
static const struct { static const struct {
......
...@@ -344,7 +344,11 @@ SEND-PR: support I need help with gcc. ...@@ -344,7 +344,11 @@ SEND-PR: support I need help with gcc.
host: @host@ host: @host@
build: @build@ build: @build@
target: @target@ target: @target@
__EOF__
cat >> $file << \__EOF__
configured with: @gcc_config_arguments@ configured with: @gcc_config_arguments@
__EOF__
cat >> $file << __EOF__
>Description: >Description:
$DESCRIPTION_C $DESCRIPTION_C
>How-To-Repeat: >How-To-Repeat:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment