get { return distccHosts; }
isset { return distccHosts && distccHosts[0]; }
}
+ property char * gccPrefix
+ {
+ set { delete gccPrefix; if(value && value[0]) gccPrefix = CopyString(value); }
+ get { return gccPrefix; }
+ isset { return gccPrefix && gccPrefix[0]; }
+ }
property Array<String> includeDirs
{
set
char * execPrefixCommand;
char * distccHosts;
bool supportsBitDepth;
+ char * gccPrefix;
/*union
{
struct { Array<String> includes, libraries, executables; };
delete makeCommand;
delete execPrefixCommand;
delete distccHosts;
+ delete gccPrefix;
if(environmentVars) environmentVars.Free();
if(includeDirs) { includeDirs.Free(); }
if(libraryDirs) { libraryDirs.Free(); }
ccacheEnabled,
distccEnabled,
supportsBitDepth,
- distccHosts
+ distccHosts,
+ gccPrefix
};
for(s : includeDirs) copy.includeDirs.Add(CopyString(s));
for(s : libraryDirs) copy.libraryDirs.Add(CopyString(s));
hasClose = true;
borderStyle = sizable;
text = $"Global Settings";
- minClientSize = { 560, 446 };
+ minClientSize = { 560, 466 };
nativeDecorations = true;
IDESettings ideSettings;
this, anchor = { left = 120, top = 216, right = 8 };
text = $"Execution Prefix", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
};
+ Label gccPrefixLabel { this, position = { 8, 246 }, labeledWindow = gccPrefix, tabCycle = false, inactive = true };
+ PathBox gccPrefix
+ {
+ this, anchor = { left = 120, top = 242, right = 8 };
+ text = $"GCC Prefix", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
+ };
bool NotifyModifiedDocument(PathBox pathBox)
{
compiler.makeCommand = pathBox.slashPath;
else if(pathBox == execPrefix)
compiler.execPrefixCommand = pathBox.slashPath;
+ else if(pathBox == gccPrefix)
+ compiler.gccPrefix = pathBox.slashPath;
modifiedDocument = true;
compilersTab.modifiedDocument = true;
}
cxx.path = compiler.cxxCommand;
make.path = compiler.makeCommand;
execPrefix.path = compiler.execPrefixCommand;
+ gccPrefix.path = compiler.gccPrefix;
ecpLabel.disabled = ecp.disabled = disabled;
eccLabel.disabled = ecc.disabled = disabled;
ccLabel.disabled = cc.disabled = isVC || disabled;
makeLabel.disabled = make.disabled = disabled;
execPrefixLabel.disabled = execPrefix.disabled = disabled;
+ gccPrefixLabel.disabled = gccPrefix.disabled = disabled;
}
modifiedDocument = false;
}
char cppCommand[MAX_LOCATION];
char ccCommand[MAX_LOCATION];
char cxxCommand[MAX_LOCATION];
+ char stripCommand[MAX_LOCATION];
char ecpCommand[MAX_LOCATION];
char eccCommand[MAX_LOCATION];
char ecsCommand[MAX_LOCATION];
char * cc = compiler.ccCommand;
char * cxx = compiler.cxxCommand;
char * cpp = compiler.cppCommand;
- sprintf(cppCommand, "%s%s%s%s ",
+ char * strip = compiler.cppCommand;
+ sprintf(cppCommand, "%s%s%s%s%s ",
compiler.ccacheEnabled ? "ccache " : "",
compiler.ccacheEnabled && !compiler.distccEnabled ? " " : "",
compiler.distccEnabled ? "distcc " : "",
+ compiler.gccPrefix ? compiler.gccPrefix : "",
compiler.cppCommand);
- sprintf(ccCommand, "%s%s%s%s ",
+ sprintf(ccCommand, "%s%s%s%s%s ",
compiler.ccacheEnabled ? "ccache " : "",
compiler.ccacheEnabled && !compiler.distccEnabled ? " " : "",
compiler.distccEnabled ? "distcc " : "",
+ compiler.gccPrefix ? compiler.gccPrefix : "",
compiler.ccCommand);
- sprintf(cxxCommand, "%s%s%s%s ",
+ sprintf(cxxCommand, "%s%s%s%s%s ",
compiler.ccacheEnabled ? "ccache " : "",
compiler.ccacheEnabled && !compiler.distccEnabled ? " " : "",
compiler.distccEnabled ? "distcc " : "",
+ compiler.gccPrefix ? compiler.gccPrefix : "",
compiler.cxxCommand);
+
+ sprintf(stripCommand, "%sstrip ",
+ compiler.gccPrefix ? compiler.gccPrefix : "");
+
sprintf(ecpCommand, "%s ", compiler.ecpCommand);
sprintf(eccCommand, "%s ", compiler.eccCommand);
sprintf(ecsCommand, "%s ", compiler.ecsCommand);
//}
}
else if(strstr(line, "ear ") == line);
- else if(strstr(line, "strip ") == line);
+ else if(strstr(line, stripCommand) == line);
else if(strstr(line, ccCommand) == line || strstr(line, cxxCommand) == line || strstr(line, ecpCommand) == line || strstr(line, eccCommand) == line)
{
char moduleName[MAX_FILENAME];
{
f.Printf("# TOOLCHAIN\n\n");
+ if(compiler.gccPrefix && compiler.gccPrefix[0])
+ f.Printf("GCC_PREFIX := %s\n", compiler.gccPrefix);
+
//f.Printf("SHELL := %s\n", "sh"/*compiler.shellCommand*/); // is this really needed?
- f.Printf("CPP := %s\n", compiler.cppCommand);
- f.Printf("CC := $(CCACHE_COMPILE) $(DISTCC_COMPILE) %s\n", compiler.ccCommand);
- f.Printf("CXX := $(CCACHE_COMPILE) $(DISTCC_COMPILE) %s\n", compiler.cxxCommand);
+ f.Printf("CPP := $(GCC_PREFIX)%s\n", compiler.cppCommand);
+ f.Printf("CC := $(CCACHE_COMPILE) $(DISTCC_COMPILE) $(GCC_PREFIX)%s\n", compiler.ccCommand);
+ f.Printf("CXX := $(CCACHE_COMPILE) $(DISTCC_COMPILE) $(GCC_PREFIX)%s\n", compiler.cxxCommand);
f.Printf("ECP := %s\n", compiler.ecpCommand);
f.Printf("ECC := %s\n", compiler.eccCommand);
f.Printf("ECS := %s -t $(TARGET_PLATFORM)\n", compiler.ecsCommand);
f.Printf("EAR := %s\n", compiler.earCommand);
- f.Printf("AS := as\n");
- f.Printf("LD := ld\n");
- f.Printf("AR := ar\n");
- f.Printf("STRIP := strip\n");
+ f.Printf("AS := $(GCC_PREFIX)as\n");
+ f.Printf("LD := $(GCC_PREFIX)ld\n");
+ f.Printf("AR := $(GCC_PREFIX)ar\n");
+ f.Printf("STRIP := $(GCC_PREFIX)strip\n");
f.Printf("UPX := upx\n");
f.Printf("\n");