Ecere Software
/
sdk
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1538d45
)
buildsystem,ide,epj2make; added GCC_PREFIX to simplify toolchain compiler changes...
author
Rejean Loyer
<rejean.loyer@gmail.com>
Tue, 23 Oct 2012 01:03:58 +0000
(21:03 -0400)
committer
Rejean Loyer
<rejean.loyer@gmail.com>
Wed, 24 Oct 2012 07:28:22 +0000
(
03:28
-0400)
Makefile
patch
|
blob
|
history
ide/src/IDESettings.ec
patch
|
blob
|
history
ide/src/dialogs/GlobalSettingsDialog.ec
patch
|
blob
|
history
ide/src/project/Project.ec
patch
|
blob
|
history
include.mk
patch
|
blob
|
history
diff --git
a/Makefile
b/Makefile
index
9f50ae5
..
d6bf157
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-626,6
+626,7
@@
troubleshoot:
@$(call echo,CCACHE_COMPILE=$(CCACHE_COMPILE))
@$(call echo,CCACHE_PREFIX=$(CCACHE_PREFIX))
@$(call echo,DISTCC=$(DISTCC))
@$(call echo,CCACHE_COMPILE=$(CCACHE_COMPILE))
@$(call echo,CCACHE_PREFIX=$(CCACHE_PREFIX))
@$(call echo,DISTCC=$(DISTCC))
+ @$(call echo,GCC_PREFIX=$(GCC_PREFIX))
@$(call echo,CC=$(CC))
@$(call echo,CPP=$(CPP))
@$(call echo,ECP=$(ECP))
@$(call echo,CC=$(CC))
@$(call echo,CPP=$(CPP))
@$(call echo,ECP=$(ECP))
diff --git
a/ide/src/IDESettings.ec
b/ide/src/IDESettings.ec
index
3d1f3ab
..
523a908
100644
(file)
--- a/
ide/src/IDESettings.ec
+++ b/
ide/src/IDESettings.ec
@@
-777,6
+777,12
@@
public:
get { return distccHosts; }
isset { return distccHosts && distccHosts[0]; }
}
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
property Array<String> includeDirs
{
set
@@
-897,6
+903,7
@@
private:
char * execPrefixCommand;
char * distccHosts;
bool supportsBitDepth;
char * execPrefixCommand;
char * distccHosts;
bool supportsBitDepth;
+ char * gccPrefix;
/*union
{
struct { Array<String> includes, libraries, executables; };
/*union
{
struct { Array<String> includes, libraries, executables; };
@@
-916,6
+923,7
@@
private:
delete makeCommand;
delete execPrefixCommand;
delete distccHosts;
delete makeCommand;
delete execPrefixCommand;
delete distccHosts;
+ delete gccPrefix;
if(environmentVars) environmentVars.Free();
if(includeDirs) { includeDirs.Free(); }
if(libraryDirs) { libraryDirs.Free(); }
if(environmentVars) environmentVars.Free();
if(includeDirs) { includeDirs.Free(); }
if(libraryDirs) { libraryDirs.Free(); }
@@
-945,7
+953,8
@@
private:
ccacheEnabled,
distccEnabled,
supportsBitDepth,
ccacheEnabled,
distccEnabled,
supportsBitDepth,
- distccHosts
+ distccHosts,
+ gccPrefix
};
for(s : includeDirs) copy.includeDirs.Add(CopyString(s));
for(s : libraryDirs) copy.libraryDirs.Add(CopyString(s));
};
for(s : includeDirs) copy.includeDirs.Add(CopyString(s));
for(s : libraryDirs) copy.libraryDirs.Add(CopyString(s));
diff --git
a/ide/src/dialogs/GlobalSettingsDialog.ec
b/ide/src/dialogs/GlobalSettingsDialog.ec
index
6a4dbfe
..
625f41e
100644
(file)
--- a/
ide/src/dialogs/GlobalSettingsDialog.ec
+++ b/
ide/src/dialogs/GlobalSettingsDialog.ec
@@
-16,7
+16,7
@@
class GlobalSettingsDialog : Window
hasClose = true;
borderStyle = sizable;
text = $"Global Settings";
hasClose = true;
borderStyle = sizable;
text = $"Global Settings";
- minClientSize = { 560, 4
4
6 };
+ minClientSize = { 560, 4
6
6 };
nativeDecorations = true;
IDESettings ideSettings;
nativeDecorations = true;
IDESettings ideSettings;
@@
-736,6
+736,12
@@
class CompilerToolchainTab : CompilersSubTab
this, anchor = { left = 120, top = 216, right = 8 };
text = $"Execution Prefix", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
};
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)
{
bool NotifyModifiedDocument(PathBox pathBox)
{
@@
-760,6
+766,8
@@
class CompilerToolchainTab : CompilersSubTab
compiler.makeCommand = pathBox.slashPath;
else if(pathBox == execPrefix)
compiler.execPrefixCommand = pathBox.slashPath;
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;
}
modifiedDocument = true;
compilersTab.modifiedDocument = true;
}
@@
-782,6
+790,7
@@
class CompilerToolchainTab : CompilersSubTab
cxx.path = compiler.cxxCommand;
make.path = compiler.makeCommand;
execPrefix.path = compiler.execPrefixCommand;
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;
ecpLabel.disabled = ecp.disabled = disabled;
eccLabel.disabled = ecc.disabled = disabled;
@@
-792,6
+801,7
@@
class CompilerToolchainTab : CompilersSubTab
ccLabel.disabled = cc.disabled = isVC || disabled;
makeLabel.disabled = make.disabled = disabled;
execPrefixLabel.disabled = execPrefix.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;
}
}
modifiedDocument = false;
}
diff --git
a/ide/src/project/Project.ec
b/ide/src/project/Project.ec
index
0244db1
..
6dbc587
100644
(file)
--- a/
ide/src/project/Project.ec
+++ b/
ide/src/project/Project.ec
@@
-1347,6
+1347,7
@@
private:
char cppCommand[MAX_LOCATION];
char ccCommand[MAX_LOCATION];
char cxxCommand[MAX_LOCATION];
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 ecpCommand[MAX_LOCATION];
char eccCommand[MAX_LOCATION];
char ecsCommand[MAX_LOCATION];
@@
-1355,21
+1356,29
@@
private:
char * cc = compiler.ccCommand;
char * cxx = compiler.cxxCommand;
char * cpp = compiler.cppCommand;
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.ccacheEnabled ? "ccache " : "",
compiler.ccacheEnabled && !compiler.distccEnabled ? " " : "",
compiler.distccEnabled ? "distcc " : "",
+ compiler.gccPrefix ? compiler.gccPrefix : "",
compiler.cppCommand);
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.ccacheEnabled ? "ccache " : "",
compiler.ccacheEnabled && !compiler.distccEnabled ? " " : "",
compiler.distccEnabled ? "distcc " : "",
+ compiler.gccPrefix ? compiler.gccPrefix : "",
compiler.ccCommand);
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.ccacheEnabled ? "ccache " : "",
compiler.ccacheEnabled && !compiler.distccEnabled ? " " : "",
compiler.distccEnabled ? "distcc " : "",
+ compiler.gccPrefix ? compiler.gccPrefix : "",
compiler.cxxCommand);
compiler.cxxCommand);
+
+ sprintf(stripCommand, "%sstrip ",
+ compiler.gccPrefix ? compiler.gccPrefix : "");
+
sprintf(ecpCommand, "%s ", compiler.ecpCommand);
sprintf(eccCommand, "%s ", compiler.eccCommand);
sprintf(ecsCommand, "%s ", compiler.ecsCommand);
sprintf(ecpCommand, "%s ", compiler.ecpCommand);
sprintf(eccCommand, "%s ", compiler.eccCommand);
sprintf(ecsCommand, "%s ", compiler.ecsCommand);
@@
-1409,7
+1418,7
@@
private:
//}
}
else if(strstr(line, "ear ") == line);
//}
}
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];
else if(strstr(line, ccCommand) == line || strstr(line, cxxCommand) == line || strstr(line, ecpCommand) == line || strstr(line, eccCommand) == line)
{
char moduleName[MAX_FILENAME];
@@
-2008,19
+2017,22
@@
private:
{
f.Printf("# TOOLCHAIN\n\n");
{
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("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("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");
f.Printf("UPX := upx\n");
f.Printf("\n");
diff --git
a/include.mk
b/include.mk
index
ef7565b
..
3f3bec1
100644
(file)
--- a/
include.mk
+++ b/
include.mk
@@
-1,14
+1,14
@@
# TOOLCHAIN
# TOOLCHAIN
-export CC = $(CCACHE_COMPILE) $(DISTCC_COMPILE) gcc
-export CPP = $(CCACHE_COMPILE) $(DISTCC_COMPILE) cpp
+export CC = $(CCACHE_COMPILE) $(DISTCC_COMPILE)
$(GCC_PREFIX)
gcc
+export CPP = $(CCACHE_COMPILE) $(DISTCC_COMPILE)
$(GCC_PREFIX)
cpp
export ECP = ecp
export ECC = ecc
export ECS = ecs
export EAR = ear
export ECP = ecp
export ECC = ecc
export ECS = ecs
export EAR = ear
-export AS = as
-export LD = ld
-export AR = ar
-export STRIP = strip
+export AS =
$(GCC_PREFIX)
as
+export LD =
$(GCC_PREFIX)
ld
+export AR =
$(GCC_PREFIX)
ar
+export STRIP =
$(GCC_PREFIX)
strip
UPX := upx
# DEBIAN
UPX := upx
# DEBIAN