Bug 578223: JSON compilation database parser: Add more compiler options that affect built-in detection for gcc

Change-Id: I2734b0317079d8a48fdbdde98f105bfe47dbdb8e
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
diff --git a/jsoncdb/org.eclipse.cdt.jsoncdb.core.doc/META-INF/MANIFEST.MF b/jsoncdb/org.eclipse.cdt.jsoncdb.core.doc/META-INF/MANIFEST.MF
index 854fc3d..64c1815 100644
--- a/jsoncdb/org.eclipse.cdt.jsoncdb.core.doc/META-INF/MANIFEST.MF
+++ b/jsoncdb/org.eclipse.cdt.jsoncdb.core.doc/META-INF/MANIFEST.MF
@@ -4,7 +4,7 @@
 Bundle-Description: %Bundle-Description
 Bundle-Copyright: %Bundle-Copyright
 Bundle-SymbolicName: org.eclipse.cdt.jsoncdb.core.doc;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.100.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-11
diff --git a/jsoncdb/org.eclipse.cdt.jsoncdb.core.doc/doc/html/builtins-detection.xhtml b/jsoncdb/org.eclipse.cdt.jsoncdb.core.doc/doc/html/builtins-detection.xhtml
index fcbc193..73a2400 100644
--- a/jsoncdb/org.eclipse.cdt.jsoncdb.core.doc/doc/html/builtins-detection.xhtml
+++ b/jsoncdb/org.eclipse.cdt.jsoncdb.core.doc/doc/html/builtins-detection.xhtml
@@ -84,6 +84,7 @@
 	<th>Vendor</th>
 	<th>Language Standard<br/>options</th>
 	<th>Non-Standard System<br/>include paths options</th>
+    <th>Other options</th>
 	</tr>
 	</thead>
 	<tbody>
@@ -92,12 +93,17 @@
 	<td>GNU Project</td>
 	<td><code>-std=</code>, <code>-ansi</code>: tested</td>
 	<td><code>--sysroot=</code>, <code>-isysroot=</code>, <code>--no-sysroot-prefix</code>: tested</td>
+    <td><code>-fPIC</code>, <code>-fpic</code>, <code>-fPIE</code>, <code>-fpie</code>
+    <code>-fstack-protector*</code>, <code>-march=</code>, <code>-march=</code>, <code>-mcpu=</code>,
+    <code>-mtune=</code>, <code>-pthread</code>
+    </td>
 	</tr>
 	<tr>
 	<td>clang</td>
 	<td>LLVM Project</td>
 	<td><code>-std=</code>, <code>-ansi</code>: tested</td>
 	<td><code>--sysroot=</code>, <code>-isysroot=</code>, <code>--no-sysroot-prefix</code>: tested</td>
+    <td></td>
 	</tr>
 	</tbody>
 	</table>
diff --git a/jsoncdb/org.eclipse.cdt.jsoncdb.core/src/org/eclipse/cdt/jsoncdb/core/participant/Arglets.java b/jsoncdb/org.eclipse.cdt.jsoncdb.core/src/org/eclipse/cdt/jsoncdb/core/participant/Arglets.java
index ae05b81..7a52ea8 100644
--- a/jsoncdb/org.eclipse.cdt.jsoncdb.core/src/org/eclipse/cdt/jsoncdb/core/participant/Arglets.java
+++ b/jsoncdb/org.eclipse.cdt.jsoncdb.core/src/org/eclipse/cdt/jsoncdb/core/participant/Arglets.java
@@ -491,7 +491,7 @@
 	public static class Target_Clang extends BuiltinDetctionArgsGeneric implements IArglet {
 		private static final Matcher[] optionMatchers = {
 				/* "--target=" triple */
-				Pattern.compile("--target=\\w+(-\\w+)*").matcher("") }; //$NON-NLS-1$ //$NON-NLS-2$
+				Pattern.compile("--target=\\w+(-\\w+)*").matcher(EMPTY_STR) }; //$NON-NLS-1$
 
 		/*-
 		* @see de.marw.cmake.cdt.lsp.IArglet#processArgs(java.lang.String)
@@ -510,7 +510,12 @@
 	public static class LangStd_GCC extends BuiltinDetctionArgsGeneric implements IArglet {
 		@SuppressWarnings("nls")
 		private static final Matcher[] optionMatchers = { Pattern.compile("-std=\\S+").matcher(EMPTY_STR),
-				Pattern.compile("-ansi").matcher(EMPTY_STR), };
+				Pattern.compile("-ansi").matcher(EMPTY_STR),
+				Pattern.compile("-fPIC", Pattern.CASE_INSENSITIVE).matcher(EMPTY_STR),
+				Pattern.compile("-fPIE", Pattern.CASE_INSENSITIVE).matcher(EMPTY_STR),
+				Pattern.compile("-fstack-protector\\S+").matcher(EMPTY_STR),
+				Pattern.compile("-march=\\\\S+").matcher(EMPTY_STR), Pattern.compile("-mcpu=\\\\S+").matcher(EMPTY_STR),
+				Pattern.compile("-mtune=\\\\S+").matcher(EMPTY_STR), Pattern.compile("-pthread").matcher(EMPTY_STR), };
 
 		/*-
 		 * @see org.eclipse.cdt.jsoncdb.IArglet#processArgs(java.lang.String)