Bug 11526 - autoconf-2.5x's ac_configure_args quoting breaks config-ml.in
Summary: autoconf-2.5x's ac_configure_args quoting breaks config-ml.in
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: unknown
: P3 minor
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-15 12:25 UTC by corsepiu
Modified: 2003-07-29 19:22 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-07-15 12:32:24


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description corsepiu 2003-07-15 12:25:27 UTC
autoconf-2.5x (Tested with autoconf-2.57) puts ac_configure_args items 
into "'"-quotes.

I.e. if a configure script is given 
--prefix=/usr --enable-multilib
ac_configure_args contains
'--prefix=/usr' '--enable-multilib'

This breaks config-ml.in ml_arguments parsing, because config-ml.in assumes
ac_configure_args to be unquoted.

From config-ml.in:
...
ml_arguments="${ac_configure_args}"
ml_realsrcdir=${srcdir}
                                                                               
                 
# Scan all the arguments and set all the ones we need.
                                                                               
                 
ml_verbose=--verbose
for option in ${ml_arguments}
do
  case $option in
  --*) ;;
  -*) option=-$option ;;
  esac
...

Note: the "case $option"-switch does not catch option strings quoted
autoconf-2.5x style. This causes configure arguments passed to multilib'ed
subdirs using autoconf-2.5x not to be parsed correctly.

AFAIS, the patch below is a potential work-around

--- config-ml.in        4 Jul 2003 19:45:44 -0000       1.26
+++ config-ml.in        15 Jul 2003 12:19:33 -0000
@@ -84,6 +84,7 @@
 for option in ${ml_arguments}
 do
   case $option in
+  \'--*'\' ) eval option="$option" ;;
   --*) ;;
   -*) option=-$option ;;
   esac
Comment 1 Andrew Pinski 2003-07-15 12:32:24 UTC
Known defect as we do not support using autoconf 2.5x but only 2.13.
Comment 2 corsepiu 2003-07-15 13:18:10 UTC
You should consider that though config-ml.in is used by and distributed via gcc,
using config-ml.in is not restricted to gcc and is the basis for all multilib
support (eg. in automake) and is used by packages outside of gcc (eg. we use it
in RTEMS).
Comment 3 Andrew Pinski 2003-07-29 19:22:35 UTC
Fixed on the mainline:
2003-07-27  Phil Edwards

        * config-ml.in:  Use ac_configure_args directly instead of
        ml_arguments.  Only set ml_norecursion if --no[-]recursion is
        actually seen. 

See <http://gcc.gnu.org/ml/gcc-patches/2003-07/msg02588.html> for the patch.