diff options
author | Doug Schaefer | 2011-04-20 15:15:41 +0000 |
---|---|---|
committer | Doug Schaefer | 2011-04-20 15:15:41 +0000 |
commit | 5a958ef8e65d058d0616823c25539d8c1454ad84 (patch) | |
tree | 3902c1f47f7fe86a925b3777c6fa68afc3c31638 /cross | |
parent | 579a0fdfa8d925280bfa7ec15110479bb15bfbb4 (diff) | |
download | org.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.
Diffstat (limited to 'cross')
-rwxr-xr-x | cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossEnvironmentVariableSupplier.java | 6 |
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 51f5036a91f..4bfb49fa94e 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) { |