Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gvozdev2013-07-23 03:09:17 -0400
committerAndrew Gvozdev2013-07-24 14:50:45 -0400
commite84409b1f0e54e2905cde561e48d9884e29b03c8 (patch)
treebd5db525689c2d94cafc4e8f12db2f7abc4f483f
parent12c5f1299086244119b44fb9aad877f9fb49a430 (diff)
downloadorg.eclipse.cdt-e84409b1f0e54e2905cde561e48d9884e29b03c8.tar.gz
org.eclipse.cdt-e84409b1f0e54e2905cde561e48d9884e29b03c8.tar.xz
org.eclipse.cdt-e84409b1f0e54e2905cde561e48d9884e29b03c8.zip
bug 404913: Dialect category and options for language standards for GCC toolchain
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/plugin.xml6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties11
-rw-r--r--build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml80
-rw-r--r--doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_build_scanner_discovery.htm5
-rw-r--r--xlc/org.eclipse.cdt.managedbuilder.xlc.core/plugin.xml2
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 68dbb80a0f..395f4dfcfb 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}"">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
@@ -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 &quot;${INPUTS}&quot;">
+ parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
@@ -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 &quot;${INPUTS}&quot;">
+ parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties
index ea1c1abd6a..d968835374 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 eaa55a1ea6..02808dff5f 100644
--- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml
+++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml
@@ -960,6 +960,46 @@
variableList="CPATH,C_INCLUDE_PATH">
</envVarBuildPath>
<optionCategory
+ owner="cdt.managedbuild.tool.gnu.c.compiler"
+ name="%OptionCategory.Dialect"
+ id="gnu.c.compiler.category.dialect">
+ </optionCategory>
+ <option
+ category="gnu.c.compiler.category.dialect"
+ defaultValue="false"
+ id="gnu.c.compiler.option.dialect.std"
+ name="%Option.Posix.Dialect"
+ useByScannerDiscovery="true"
+ valueType="enumerated">
+ <enumeratedOptionValue
+ name="%Option.Posix.Dialect.default"
+ command=""
+ id="gnu.c.compiler.dialect.default">
+ </enumeratedOptionValue>
+ <enumeratedOptionValue
+ name="%Option.Posix.Dialect.c90"
+ command="-std=c90"
+ id="gnu.c.compiler.dialect.c90">
+ </enumeratedOptionValue>
+ <enumeratedOptionValue
+ name="%Option.Posix.Dialect.c99"
+ command="-std=c99"
+ id="gnu.c.compiler.dialect.c99">
+ </enumeratedOptionValue>
+ <enumeratedOptionValue
+ name="%Option.Posix.Dialect.c11"
+ command="-std=c11"
+ id="gnu.c.compiler.dialect.c11">
+ </enumeratedOptionValue>
+ </option>
+ <option
+ name="%Option.Posix.Dialect.Flags"
+ category="gnu.c.compiler.category.dialect"
+ id="gnu.c.compiler.option.dialect.flags"
+ useByScannerDiscovery="true"
+ valueType="string">
+ </option>
+ <optionCategory
owner="cdt.managedbuild.tool.gnu.c.compiler"
name="%OptionCategory.Preproc"
id="gnu.c.compiler.category.preprocessor">
@@ -1297,6 +1337,46 @@
</envVarBuildPath>
<optionCategory
owner="cdt.managedbuild.tool.gnu.cpp.compiler"
+ name="%OptionCategory.Dialect"
+ id="gnu.cpp.compiler.category.dialect">
+ </optionCategory>
+ <option
+ category="gnu.cpp.compiler.category.dialect"
+ defaultValue="false"
+ id="gnu.cpp.compiler.option.dialect.std"
+ name="%Option.Posix.Dialect"
+ useByScannerDiscovery="true"
+ valueType="enumerated">
+ <enumeratedOptionValue
+ name="%Option.Posix.Dialect.default"
+ command=""
+ id="gnu.cpp.compiler.dialect.default">
+ </enumeratedOptionValue>
+ <enumeratedOptionValue
+ name="%Option.Posix.Dialect.c++98"
+ command="-std=c++98"
+ id="gnu.cpp.compiler.dialect.c++98">
+ </enumeratedOptionValue>
+ <enumeratedOptionValue
+ name="%Option.Posix.Dialect.c++11"
+ command="-std=c++0x"
+ id="gnu.cpp.compiler.dialect.c++11">
+ </enumeratedOptionValue>
+ <enumeratedOptionValue
+ name="%Option.Posix.Dialect.c++1y"
+ command="-std=c++1y"
+ id="gnu.cpp.compiler.dialect.c++1y">
+ </enumeratedOptionValue>
+ </option>
+ <option
+ name="%Option.Posix.Dialect.Flags"
+ category="gnu.cpp.compiler.category.dialect"
+ id="gnu.cpp.compiler.option.dialect.flags"
+ useByScannerDiscovery="true"
+ valueType="string">
+ </option>
+ <optionCategory
+ owner="cdt.managedbuild.tool.gnu.cpp.compiler"
name="%OptionCategory.Preproc"
id="gnu.cpp.compiler.category.preprocessor">
</optionCategory>
diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_build_scanner_discovery.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_build_scanner_discovery.htm
index 189b0f2a51..33baf04b00 100644
--- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_build_scanner_discovery.htm
+++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_build_scanner_discovery.htm
@@ -181,9 +181,10 @@ Language settings providers can have options that affect the behavior of a provi
<td headers="description2">The command to make the compiler print built-in settings.
Following variables are recognized:
<ul>
- <li><strong>${COMMAND}</strong> - compiler command from the toolchain, such as "gcc".</li>
+ <li><strong>${COMMAND}</strong> - compiler command from the tool-chain, such as "gcc".</li>
+ <li><strong>${FLAGS}</strong> - applicable compiler flags from the tool-chain, such as language dialect flag "-std=c++0x".</li>
<li><strong>${INPUTS}</strong> - 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.
</li>
<li><strong>${EXT}</strong> - 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 49687e9de1..272caf0579 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 &quot;${INPUTS}&quot;">
+ parameter="${COMMAND} ${FLAGS} -E -V -P -w &quot;${INPUTS}&quot;">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>

Back to the top