Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2018-05-06 18:04:36 +0000
committerDoug Schaefer2018-05-06 21:02:16 +0000
commit6b9042e6941e1fa9a4687bddbe1470c38878194b (patch)
treed447a899abfd7d991e160f3566dcff31ccba8336 /build/org.eclipse.cdt.build.gcc.core
parent7f0238a2aa4c989c428a892749ad7fc8ef930ba2 (diff)
downloadorg.eclipse.cdt-6b9042e6941e1fa9a4687bddbe1470c38878194b.tar.gz
org.eclipse.cdt-6b9042e6941e1fa9a4687bddbe1470c38878194b.tar.xz
org.eclipse.cdt-6b9042e6941e1fa9a4687bddbe1470c38878194b.zip
Extend GCC OS detection
If we can't tell from the second element, try the third. If it's linux, we're good. If it's elf, use the second element. This catches the esp32 xtensa compiler which is driving this change and make sure we don't mess up too many others. Change-Id: I4650e5fa309677c596e9f5f64f50bcc2ebdef334
Diffstat (limited to 'build/org.eclipse.cdt.build.gcc.core')
-rw-r--r--build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/internal/GCCPathToolChainProvider.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/internal/GCCPathToolChainProvider.java b/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/internal/GCCPathToolChainProvider.java
index 7debdd90391..73905b52a84 100644
--- a/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/internal/GCCPathToolChainProvider.java
+++ b/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/internal/GCCPathToolChainProvider.java
@@ -72,6 +72,15 @@ public class GCCPathToolChainProvider implements IToolChainProvider {
case "apple": //$NON-NLS-1$
gcc.setProperty(IToolChain.ATTR_OS, Platform.OS_MACOSX);
break;
+ default:
+ switch (tuple[2]) {
+ case "linux":
+ gcc.setProperty(IToolChain.ATTR_OS, Platform.OS_LINUX);
+ break;
+ case "elf":
+ gcc.setProperty(IToolChain.ATTR_OS, tuple[1]);
+ break;
+ }
}
try {
if (manager.getToolChain(gcc.getTypeId(), gcc.getId()) == null) {

Back to the top