Bug 34922 - toplevel ./configure --help is incomplete
Summary: toplevel ./configure --help is incomplete
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: documentation
Depends on:
Blocks:
 
Reported: 2008-01-22 13:59 UTC by Bernhard Reutner-Fischer
Modified: 2008-01-30 16:21 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Reutner-Fischer 2008-01-22 13:59:07 UTC
enable/disable configure flags for libgomp and libmudflap are not documented in the toplevel ./configure --help, unlike libssp.

pinskia said that "disabling toplevel directories is generic".

libstdc++-v3 gives:
$ ../../src/gcc-4.3/configure --disable-libstdc++-v3
configure: error: invalid feature name: libstdc++-v3
Comment 1 Bernhard Reutner-Fischer 2008-01-22 14:03:22 UTC
If disabling toplevel directories is really generic, then libada and libssp should be removed from the --help output.
--enable-languages=c --disable-libstdc++-v3
should be accepted.

Means to use a different libstdc++ should be provided.
Comment 2 Ralf Wildenhues 2008-01-22 17:32:08 UTC
(In reply to comment #0)
> 
> libstdc++-v3 gives:
> $ ../../src/gcc-4.3/configure --disable-libstdc++-v3
> configure: error: invalid feature name: libstdc++-v3

This error is from the Autoconf code that parses arguments, it currently
disallows characters other than alphanumeric, minus, dot, or underscore
in --enable/--disable/--with/--without arguments.  I suppose this should
be fixed in Autoconf.

However, there is also a bug in configure.ac, and with that fixed, you
will be able to use
  --disable-libstdc__-v3

(i.e., with the plus signs converted to underscore).  Once GCC switches
to a fixed Autoconf version, the plus sign conversion will not be needed
any more.

Patch posted at <http://gcc.gnu.org/ml/gcc-patches/2008-01/msg01029.html>.

Cheers,
Ralf
Comment 3 Bernhard Reutner-Fischer 2008-01-22 18:04:57 UTC
You should document this (awkward) flag in the --help output, though.

Still, it is inconsistent to mention just a few of the possible arguments in the help text, thus my question:

Should all toplevel libdirs be listed in the help text or should none of the toplevel libdirs be listed in the help text?

If the latter, then let's please add a short note to the help text that mentiones these implied arguments, e.g.
--without-PACKAGE        do not use PACKAGE (same as --with-PACKAGE=no)
                         where PACKAGE can be any toplevel lib directory
                         except libgcc.

Comment 4 brian 2008-01-22 18:38:34 UTC
Remember that this toplevel configure is shared between gcc, binutils, gdb, newlib, insight, and cygwin.  It should not list gcc-specific options; the fact that it does now is just an artifact resulting from how those options happen to be implemented.  It would make no sense for e.g. the next gdb release to contain documentation for a --disable-libmudflap option in its --help.

In an ideal world the toplevel configure would check at runtime and see what subdirs are present and adjust its output accordingly.  Also --help=recursive should be fixed, as there are tons and tons of options that are only shown if you run configure --help in the subdirs, but are never shown by the toplevel --help.
Comment 5 Ralf Wildenhues 2008-01-22 20:43:23 UTC
Subject: Re:  toplevel ./configure --help is incomplete

* brian at dessent dot net wrote on Tue, Jan 22, 2008 at 07:38:35PM CET:
> 
> Remember that this toplevel configure is shared between gcc, binutils, gdb,
> newlib, insight, and cygwin.

> In an ideal world the toplevel configure would check at runtime and see what
> subdirs are present and adjust its output accordingly.  Also --help=recursive
> should be fixed, as there are tons and tons of options that are only shown if
> you run configure --help in the subdirs, but are never shown by the toplevel
> --help.

I guess without more intrusive hacking that will have to wait until GCC
uses Autoconf 2.62 (I just found one more glitch in there), and even
then I suppose some ugliness such as this is needed:

Index: configure.ac
===================================================================
--- configure.ac	(revision 131735)
+++ configure.ac	(working copy)
@@ -207,6 +207,10 @@
 target_configdirs=`echo ${target_libraries} ${target_tools}`
 build_configdirs=`echo ${build_libs} ${build_tools}`
 
+m4_divert_text([PARSE_ARGS],
+[ac_subdirs_all=`cd $srcdir && echo */configure | sed 's,/configure,,g'`
+])
+
 ################################################################################
 
 srcname="gnu development package"
Comment 6 Ralf Wildenhues 2008-01-22 22:25:53 UTC
(In reply to comment #2)
> (In reply to comment #0)
> > 
> > libstdc++-v3 gives:
> > $ ../../src/gcc-4.3/configure --disable-libstdc++-v3
> > configure: error: invalid feature name: libstdc++-v3
> 
> This error is from the Autoconf code that parses arguments, it currently
> disallows characters other than alphanumeric, minus, dot, or underscore
> in --enable/--disable/--with/--without arguments.  I suppose this should
> be fixed in Autoconf.

Fixed in Autoconf:
<http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commit;h=7fa2f766b836280ef3a9a338211bce55ac223565>
Comment 7 Ralf Wildenhues 2008-01-23 06:42:52 UTC
(In reply to comment #5)
> 
> > In an ideal world the toplevel configure would check at runtime and see what
> > subdirs are present and adjust its output accordingly.  Also --help=recursive
> > should be fixed, as there are tons and tons of options that are only shown if
> > you run configure --help in the subdirs, but are never shown by the toplevel
> > --help.

Patch posted: <http://gcc.gnu.org/ml/gcc-patches/2008-01/msg01061.html>

> I guess without more intrusive hacking that will have to wait until GCC
> uses Autoconf 2.62 (I just found one more glitch in there)

Autoconf glitch fixed:
<http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commit;h=0fd647c6364a383b13af31b45e07679c293ff09f>
Comment 8 Paolo Bonzini 2008-01-30 13:37:30 UTC
Subject: Bug 34922

Author: bonzini
Date: Wed Jan 30 13:36:35 2008
New Revision: 131961

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131961
Log:
2008-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        PR bootstrap/34922
        * configure.ac (PARSE_ARGS): Push suitable setting of
        ac_subdirs_all, for `./configure --help=recursive'.
        Handle `+' in generic toplevel directory disabling.
        * configure: Regenerate.


Modified:
    trunk/ChangeLog
    trunk/configure
    trunk/configure.ac

Comment 9 Paolo Bonzini 2008-01-30 16:21:44 UTC
patch committed.