Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2011-04-20 11:15:41 -0400
committerDoug Schaefer2011-04-20 11:15:41 -0400
commit5a958ef8e65d058d0616823c25539d8c1454ad84 (patch)
tree3902c1f47f7fe86a925b3777c6fa68afc3c31638
parent579a0fdfa8d925280bfa7ec15110479bb15bfbb4 (diff)
downloadorg.eclipse.cdt-5a958ef8e65d058d0616823c25539d8c1454ad84.tar.gz
org.eclipse.cdt-5a958ef8e65d058d0616823c25539d8c1454ad84.tar.xz
org.eclipse.cdt-5a958ef8e65d058d0616823c25539d8c1454ad84.zip
Bug 343427 - Allow cross gcc paths that don't have bin as the last segment.
-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