This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, 1/4] Enable libstdc++ as a DLL on windows platforms.


  This is patch #1 in the series.  It is a repost of the patch I posted
earlier at:

        http://gcc.gnu.org/ml/gcc-patches/2009-07/msg00488.html

and is required to support the use of the preprocessor 'defined' operator (and
indeed any expression complex enough to require brackets) in the Cond() clause
in .opt files.  Tested both manually and as part of a bootstrap, as described
at the URL above.

gcc/ChangeLog:

	* opt-functions.awk (opt_args): Allow argument to be enclosed in
	curly braces.
	* doc/options.texi (Option properties): Mention new quoting syntax.

  Ok?

    cheers,
      DaveK
http://gcc.gnu.org/ml/gcc-patches/2009-07/msg00488.html

gcc/ChangeLog:

	* opt-functions.awk (opt_args): Allow argument to be enclosed in
	curly braces.
	* doc/options.texi (Option properties): Mention new quoting syntax.

Index: gcc/doc/options.texi
===================================================================
--- gcc/doc/options.texi	(revision 149338)
+++ gcc/doc/options.texi	(working copy)
@@ -84,8 +84,17 @@ configurations and yet the masks always need to be
 @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
 The option is available for all languages and targets.
Index: gcc/opt-functions.awk
===================================================================
--- gcc/opt-functions.awk	(revision 149338)
+++ gcc/opt-functions.awk	(working copy)
@@ -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
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]