mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 17:35:35 +02:00
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
This commit is contained in:
parent
7f0238a2aa
commit
6b9042e694
1 changed files with 9 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue