This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] grab all contents of multiline help in *.opt
- From: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 1 Mar 2009 08:17:40 +0100
- Subject: [PATCH] grab all contents of multiline help in *.opt
- References: <20090301071014.GA6143@ins.uni-bonn.de>
Multi-line help texts are currently cut off, see for example:
(GNU sed-specific notation)
$ gcc -v --help 2>/dev/null | sed '/-std=c++0x/{N;N;p;}; d'
This patch fixes it.
I think this is no regression, but a long-standing bug; it may be that
older GCC simply didn't have multi-line help strings in .opt files; I
haven't checked.
So, OK for 4.5?
Thanks,
Ralf
gcc/ChangeLog:
2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* optc-gen.awk: Assign all remaining fields to help string,
space-separated, for multi-line help in *.opt.
diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk
index 860810a..3e644a5 100644
--- a/gcc/optc-gen.awk
+++ b/gcc/optc-gen.awk
@@ -53,6 +53,8 @@ BEGIN {
opts[n_opts] = $1
flags[n_opts] = $2
help[n_opts] = $3
+ for (i = 4; i <= NF; i++)
+ help[n_opts] = help[n_opts] " " $i
n_opts++;
}
}