Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/cross
diff options
context:
space:
mode:
Diffstat (limited to 'cross')
-rw-r--r--cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossGCCBuiltinSpecsDetector.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossGCCBuiltinSpecsDetector.java b/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossGCCBuiltinSpecsDetector.java
index fc26b62374f..88c3616da92 100644
--- a/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossGCCBuiltinSpecsDetector.java
+++ b/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossGCCBuiltinSpecsDetector.java
@@ -23,14 +23,16 @@ public class CrossGCCBuiltinSpecsDetector extends GCCBuiltinSpecsDetector {
protected String getCompilerCommand(String languageId) {
// Include the cross command prefix (tool option) in the ${COMMAND} macro
// For example: "arch-os-" + "gcc"
- String prefix = "";
+ String prefix = ""; //$NON-NLS-1$
IToolChain toolchain = null;
if (currentCfgDescription != null) {
IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(currentCfgDescription);
toolchain = cfg != null ? cfg.getToolChain() : null;
if (toolchain != null) {
IOption option = toolchain.getOptionBySuperClassId("cdt.managedbuild.option.gnu.cross.prefix"); //$NON-NLS-1$
- prefix = (String)option.getValue();
+ if (option != null) {
+ prefix = (String) option.getValue();
+ }
}
}
return prefix + super.getCompilerCommand(languageId);

Back to the top