aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDave Korn <dave.korn.cygwin@gmail.com>2009-07-30 07:22:28 +0000
committerDave Korn <davek@gcc.gnu.org>2009-07-30 07:22:28 +0000
commit88c2fd3d625c9a0536d72f07fd969ef535b90c52 (patch)
treec3af7b6302d96f3f323c6e92b209e680e2030f62 /gcc
parent5ea8f97799dcf2fd4cbc7848f1d5665d507ef597 (diff)
downloadgcc-88c2fd3d625c9a0536d72f07fd969ef535b90c52.zip
gcc-88c2fd3d625c9a0536d72f07fd969ef535b90c52.tar.gz
gcc-88c2fd3d625c9a0536d72f07fd969ef535b90c52.tar.bz2
opt-functions.awk (opt_args): Allow argument to be enclosed in curly braces.
* opt-functions.awk (opt_args): Allow argument to be enclosed in curly braces. * doc/options.texi (Option properties): Mention new quoting syntax. From-SVN: r150248
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/doc/options.texi11
-rw-r--r--gcc/opt-functions.awk8
3 files changed, 23 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0b69427..d945d50 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2009-07-30 Dave Korn <dave.korn.cygwin@gmail.com>
+
+ * opt-functions.awk (opt_args): Allow argument to be enclosed in
+ curly braces.
+ * doc/options.texi (Option properties): Mention new quoting syntax.
+
2009-07-29 Douglas B Rupp <rupp@gnat.com>
* config/alpha/alpha.c (alpha_start_function):
diff --git a/gcc/doc/options.texi b/gcc/doc/options.texi
index 53ad66b..2041de9 100644
--- a/gcc/doc/options.texi
+++ b/gcc/doc/options.texi
@@ -84,7 +84,16 @@ configurations and yet the masks always need to be defined.
@node Option properties
@section Option properties
-The second field of an option record can specify the following properties:
+The second field of an option record can specify any of the following
+properties. When an option takes an argument, it is enlosed in parentheses
+following the option property name. The parser that handles option files
+is quite simplistic, and will be tricked by any nested parentheses within
+the argument text itself; in this case, the entire option argument can
+be wrapped in curly braces within the parentheses to demarcate it, e.g.:
+
+@smallexample
+Condition(@{defined (USE_CYGWIN_LIBSTDCXX_WRAPPERS)@})
+@end smallexample
@table @code
@item Common
diff --git a/gcc/opt-functions.awk b/gcc/opt-functions.awk
index ae1e1cb..98414da 100644
--- a/gcc/opt-functions.awk
+++ b/gcc/opt-functions.awk
@@ -41,7 +41,13 @@ function opt_args(name, flags)
if (flags !~ " " name "\\(")
return ""
sub(".* " name "\\(", "", flags)
- sub("\\).*", "", flags)
+ if (flags ~ "^{")
+ {
+ sub ("^{", "", flags)
+ sub("}\\).*", "", flags)
+ }
+ else
+ sub("\\).*", "", flags)
return flags
}