1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-21 21:52:10 +02:00

Bug 546518 - Container gcc toolchain should just depend on path

- change ContainerGCCToolChain.getCommandPath() to just return
  the command
- change default command to be gcc instead of /usr/bin/gcc

Change-Id: I62869d974e7fc9707ee02dc6f5e2ab4500ddd0bc
This commit is contained in:
Jeff Johnston 2019-04-17 11:29:02 -04:00
parent bf9575d365
commit 98ab473c5f

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2015, 2017, 2018 QNX Software Systems and others.
* Copyright (c) 2015, 2019 QNX Software Systems and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@ -84,7 +84,7 @@ public class ContainerGCCToolChain extends PlatformObject implements IToolChain,
public ContainerGCCToolChain(String id, IToolChainProvider provider, Map<String, String> properties,
IEnvironmentVariable[] envVars) {
this.provider = provider;
this.path = new File("/usr/bin/gcc").toPath(); //$NON-NLS-1$
this.path = new File("gcc").toPath(); //$NON-NLS-1$
// We include arch in the id since a compiler can support multiple arches.
StringBuilder idBuilder = new StringBuilder("container-gcc-"); //$NON-NLS-1$
@ -475,11 +475,7 @@ public class ContainerGCCToolChain extends PlatformObject implements IToolChain,
@Override
public Path getCommandPath(Path command) {
if (command.isAbsolute()) {
return command;
}
return new File("/usr/bin/" + command).toPath(); //$NON-NLS-1$
return command;
}
private void initCompileCommands() {