1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 343427 - Allow cross gcc paths that don't have bin as the last segment.

This commit is contained in:
Doug Schaefer 2011-04-20 15:15:41 +00:00
parent 579a0fdfa8
commit 5a958ef8e6

View file

@ -51,7 +51,11 @@ public class CrossEnvironmentVariableSupplier implements
IToolChain toolchain = configuration.getToolChain();
IOption option = toolchain.getOptionBySuperClassId("cdt.managedbuild.option.gnu.cross.path");
String path = (String)option.getValue();
return new PathEnvironmentVariable(new File(path, "bin"));
File sysroot = new File(path);
File bin = new File(sysroot, "bin");
if (bin.isDirectory())
sysroot = bin;
return new PathEnvironmentVariable(sysroot);
}
public static boolean isVar(String name) {