From e84409b1f0e54e2905cde561e48d9884e29b03c8 Mon Sep 17 00:00:00 2001 From: Andrew Gvozdev Date: Tue, 23 Jul 2013 03:09:17 -0400 Subject: [PATCH] bug 404913: Dialect category and options for language standards for GCC toolchain --- .../plugin.xml | 6 +- .../plugin.properties | 11 +++ .../plugin.xml | 80 +++++++++++++++++++ .../cdt_u_pref_build_scanner_discovery.htm | 5 +- .../plugin.xml | 2 +- 5 files changed, 98 insertions(+), 6 deletions(-) diff --git a/build/org.eclipse.cdt.managedbuilder.core/plugin.xml b/build/org.eclipse.cdt.managedbuilder.core/plugin.xml index 68dbb80a0fe..395f4dfcfb1 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/plugin.xml +++ b/build/org.eclipse.cdt.managedbuilder.core/plugin.xml @@ -609,7 +609,7 @@ class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" name="%GCCBuildinCompilerSettings.name" - parameter="${COMMAND} -E -P -v -dD "${INPUTS}""> + parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}""> @@ -617,7 +617,7 @@ class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorCygwin" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorCygwin" name="CDT GCC Builtin Compiler Settings Cygwin" - parameter="${COMMAND} -E -P -v -dD "${INPUTS}""> + parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}""> @@ -625,7 +625,7 @@ class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorMinGW" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorMinGW" name="%GCCBuildinCompilerSettingsMinGW.name" - parameter="${COMMAND} -E -P -v -dD "${INPUTS}""> + parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}""> diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties index ea1c1abd6ae..d9688353747 100644 --- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties +++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties @@ -99,6 +99,7 @@ ToolName.compiler.solaris.cpp = Solaris C++ Compiler # Generic Category Names OptionCategory.Symbols = Symbols +OptionCategory.Dialect = Dialect OptionCategory.Preproc = Preprocessor OptionCategory.Dirs = Includes OptionCategory.General = General @@ -110,6 +111,16 @@ OptionCategory.Libs=Libraries OptionCategory.Shared.Settings=Shared Library Settings # Generic Option Names +Option.Posix.Dialect=Language standard +Option.Posix.Dialect.default= +Option.Posix.Dialect.c90=ISO C90 / ANSI C89 (-std=c90) +Option.Posix.Dialect.c99=ISO C99 (-std=c99) +Option.Posix.Dialect.c11=ISO C11 (-std=c11) +Option.Posix.Dialect.c++98=ISO C++98 (-std=c++98) +Option.Posix.Dialect.c++11=ISO C++11 (-std=c++0x) +Option.Posix.Dialect.c++1y=ISO C++1y (-std=c++1y) +Option.Posix.Dialect.Flags=Other dialect flags + Option.Posix.PreprocOnly=Preprocess only (-E) Option.Posix.Nostdinc=Do not search system directories (-nostdinc) diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml index eaa55a1ea6f..02808dff5f4 100644 --- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml +++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml @@ -959,6 +959,46 @@ pathType="buildpathInclude" variableList="CPATH,C_INCLUDE_PATH"> + + + + + + + + The command to make the compiler print built-in settings. Following variables are recognized:
    -
  • ${COMMAND} - compiler command from the toolchain, such as "gcc".
  • +
  • ${COMMAND} - compiler command from the tool-chain, such as "gcc".
  • +
  • ${FLAGS} - applicable compiler flags from the tool-chain, such as language dialect flag "-std=c++0x".
  • ${INPUTS} - indicates normally an empty specs file required by the compiler. - In no such file exists the file gets created temporarily in Eclipse workspace plugin area. + If no such file exists the file gets created temporarily in Eclipse workspace plugin area.
  • ${EXT} - an extension for the language to discover built-in settings. A provider can be associated with multiple languages and it will run the command for each language. diff --git a/xlc/org.eclipse.cdt.managedbuilder.xlc.core/plugin.xml b/xlc/org.eclipse.cdt.managedbuilder.xlc.core/plugin.xml index 49687e9de19..272caf0579a 100644 --- a/xlc/org.eclipse.cdt.managedbuilder.xlc.core/plugin.xml +++ b/xlc/org.eclipse.cdt.managedbuilder.xlc.core/plugin.xml @@ -82,7 +82,7 @@ class="org.eclipse.cdt.managedbuilder.xlc.core.XlcBuiltinSpecsDetector" id="org.eclipse.cdt.managedbuilder.xlc.core.XlcBuiltinSpecsDetector" name="%XlcBuiltinSpecsDetectorName" - parameter="${COMMAND} -E -V -P -w "${INPUTS}""> + parameter="${COMMAND} ${FLAGS} -E -V -P -w "${INPUTS}"">