Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossEnvironmentVariableSupplier.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossEnvironmentVariableSupplier.java b/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossEnvironmentVariableSupplier.java
index 51f5036a91..4bfb49fa94 100755
--- a/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossEnvironmentVariableSupplier.java
+++ b/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossEnvironmentVariableSupplier.java
@@ -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) {

Back to the top