1) Update cross-plat-dev-utils for gcc 4.4.3
2) Fix parameterfileprocessor.c/.h to build with gcc 4.4.3
--- a/cross-plat-dev-utils/fix_epoc32_linux.pl Wed Oct 06 15:13:17 2010 +0100
+++ b/cross-plat-dev-utils/fix_epoc32_linux.pl Wed Oct 06 16:32:01 2010 +0100
@@ -37,16 +37,16 @@
mkdir $gcc_include_dir or die $!;
print ">>> Created \"$gcc_include_dir\"\n";
}
-my $gcc_441_prelinclude_hdr_rel = File::Spec->catfile("epoc32","include","gcc","gcc_4_4_1.h");
-my $gcc_441_prelinclude_hdr_abs = File::Spec->catfile("$epocroot","$gcc_441_prelinclude_hdr_rel");
+my $gcc_443_prelinclude_hdr_rel = File::Spec->catfile("epoc32","include","gcc","gcc_4_4_3.h");
+my $gcc_443_prelinclude_hdr_abs = File::Spec->catfile("$epocroot","$gcc_443_prelinclude_hdr_rel");
my $gcc_prelinclude_hdr = File::Spec->catfile("$epocroot","epoc32","include","gcc","gcc.h");
-if (apply_patch_file($gcc_441_prelinclude_hdr_rel)) {
- print ">>> Created \"$gcc_441_prelinclude_hdr_abs\"\n";
+if (apply_patch_file($gcc_443_prelinclude_hdr_rel)) {
+ print ">>> Created \"$gcc_443_prelinclude_hdr_abs\"\n";
unlink($gcc_prelinclude_hdr)
}
if (! -l $gcc_prelinclude_hdr) {
- symlink($gcc_441_prelinclude_hdr_abs,$gcc_prelinclude_hdr);
- print ">>> Created symlink \"$gcc_441_prelinclude_hdr_abs\" -> \"$gcc_prelinclude_hdr\"\n";
+ symlink($gcc_443_prelinclude_hdr_abs,$gcc_prelinclude_hdr);
+ print ">>> Created symlink \"$gcc_443_prelinclude_hdr_abs\" -> \"$gcc_prelinclude_hdr\"\n";
}
exit 0;
--- a/cross-plat-dev-utils/get_wordsize.c Wed Oct 06 15:13:17 2010 +0100
+++ b/cross-plat-dev-utils/get_wordsize.c Wed Oct 06 16:32:01 2010 +0100
@@ -16,7 +16,7 @@
int main(void)
{
- printf("%lu\n",sizeof(unsigned long));
+ printf("%lu\n",(unsigned long)sizeof(unsigned long));
exit(0);
}
--- a/cross-plat-dev-utils/patch-files/linux/linux_build/sbsv2/raptor/lib/config/gcc.xml Wed Oct 06 15:13:17 2010 +0100
+++ b/cross-plat-dev-utils/patch-files/linux/linux_build/sbsv2/raptor/lib/config/gcc.xml Wed Oct 06 16:32:01 2010 +0100
@@ -16,7 +16,12 @@
<!-- tools and scripts -->
<env name='JAVATC' default='$(JAVA_HOME)/bin/java' type='tool'/> <!-- Java used by Trace Compiler -->
+ <!-- targettypes -->
+ <set name="TARGET_TYPES" value="exe lib"/>
+
<!-- interfaces -->
+ <append name="INTERFACE_TYPES" value="$(TARGET_TYPES)"/>
+
<set name="INTERFACE.exe" value="Tools.exe"/>
<set name="INTERFACE.lib" value="Tools.lib"/>
@@ -43,7 +48,7 @@
<set name='CDEFS.WIN32' value='$(CDEFS.DEFAULT) _WIN32 WIN32 _WINDOWS __TOOLS2_WINDOWS__'/>
<set name='CDEFS.LINUX' value='$(CDEFS.DEFAULT) __LINUX__ __TOOLS2_LINUX__'/>
- <set name='INC.COMPILER' value='$(EPOCINCLUDE)/gcc/gcc.h'/>
+ <set name='PREINCLUDE' value='$(EPOCINCLUDE)/gcc/gcc.h'/>
<set name='OPT.D' value='-D'/>
<set name='OPT.L' value='-L'/>
@@ -74,10 +79,11 @@
<set name='BLDINF_OUTPUTPATH' value='$(SBS_BUILD_DIR)'/>
<set name='OUTPUTPATH' value='$(SBS_BUILD_DIR)'/>
- <set name='RELEASEPATH' value='$(EPOCROOT)/epoc32/release/tools2$$(TOOLPLATFORMDIR)'/>
+ <set name='RELEASEPATH' value='$(EPOCROOT)/epoc32/release/tools2' host='win.*'/>
+ <set name='RELEASEPATH' value='$(EPOCROOT)/epoc32/release/tools2/$(HOSTPLATFORM_DIR)' host='lin.*'/>
</var>
- <var name="tools2_deb" extends="tools2_base">
+ <var name="t_deb">
<set name='TOOLSPATH' value=''/> <!-- do not install -->
<set name='VARIANTTYPE' value='deb'/>
@@ -85,19 +91,21 @@
<append name='CDEFS' value='_DEBUG'/>
<append name='RELEASEPATH' value='/deb' separator=''/>
</var>
-
- <var name="tools2_rel" extends="tools2_base">
- <set name='TOOLSPATH' value='$(EPOCTOOLS)'/> <!-- install -->
+ <alias name="tools2_deb" meaning="tools2_base.t_deb"/>
+
+ <var name="t_rel">
+ <set name='TOOLSPATH' value='$(EPOCROOT)/epoc32/tools'/> <!-- install -->
<set name='VARIANTTYPE' value='rel'/>
<append name='CFLAGS' value='-s'/>
<append name='CDEFS' value='NDEBUG'/>
<append name='RELEASEPATH' value='/rel' separator=''/>
</var>
-
+ <alias name="tools2_rel" meaning="tools2_base.t_rel"/>
+
<group name="tools2">
- <varRef ref='tools2_rel'/>
- <varRef ref='tools2_deb'/>
+ <aliasRef ref='tools2_rel'/>
+ <aliasRef ref='tools2_deb'/>
</group>
</build>
--- a/imgtools/imglib/parameterfileprocessor/include/parameterfileprocessor.h Wed Oct 06 15:13:17 2010 +0100
+++ b/imgtools/imglib/parameterfileprocessor/include/parameterfileprocessor.h Wed Oct 06 16:32:01 2010 +0100
@@ -48,7 +48,7 @@
// read from parameter-file.
public:
- CParameterFileProcessor(String aParamFileName);
+ CParameterFileProcessor(String const & aParamFileName);
bool ParameterFileProcessor();
unsigned int GetNoOfArguments() const;
char** GetParameters() const;
--- a/imgtools/imglib/parameterfileprocessor/source/parameterfileprocessor.cpp Wed Oct 06 15:13:17 2010 +0100
+++ b/imgtools/imglib/parameterfileprocessor/source/parameterfileprocessor.cpp Wed Oct 06 16:32:01 2010 +0100
@@ -32,7 +32,7 @@
@internalComponent
@released
*/
-CParameterFileProcessor::CParameterFileProcessor(String aParamFileName):
+CParameterFileProcessor::CParameterFileProcessor(String const & aParamFileName):
iParamFileName(aParamFileName),iNoOfArguments(0),
iParamFileArgs(NULL)
{
--- a/imgtools/romtools/rombuild/romnibus.pl Wed Oct 06 15:13:17 2010 +0100
+++ b/imgtools/romtools/rombuild/romnibus.pl Wed Oct 06 16:32:01 2010 +0100
@@ -164,10 +164,10 @@
while(@path_parts[-1] ne "sf") {
pop(@path_parts);
}
-$e32path = File::Spec->catdir((@path_parts,"os"));
-$e32path .= ($on_windows ? '\\' : '/');
-$base_path = $e32path; # Can't be quite right.
-$rombuildpath = File::Spec->catfile($e32path,"kernelhwsrv","kernel","eka","rombuild");
+$base_path = File::Spec->catdir((@path_parts,"os"));
+$rombuildpath = File::Spec->catfile($base_path,"kernelhwsrv","kernel","eka","rombuild");
+$base_path .= ($on_windows ? '\\' : '/');
+$e32path = ($on_windows ? "\\sf\\os" : "/sf/os");
use E32Plat;
{
@@ -264,17 +264,18 @@
$smain=$main;
}
+unless ($on_windows) {
+ $main = lc($main);
+ $kmain = lc($kmain);
+}
+
+
open(X, "$skel") || die "Can't open type file $skel, $!";
open(OUT, "> rom1.tmp") || die "Can't open output file, $!";
# First output the ROM name
print OUT "\nromname=$romname\n";
while(<X>) {
- unless ($on_windows) {
- if (m/#include/) {
- s|\\|\/|g;
- }
- }
s/\#\#ASSP\#\#/$opts{'assp'}/;
s/\#\#VARIANT\#\#/$opts{'variant'}/;
s/\#\#BUILD\#\#/$opts{'build'}/;
@@ -285,6 +286,12 @@
s/\#\#EUSERDIR\#\#/$euserdir/;
s/\#\#ELOCLDIR\#\#/$elocldir/;
s/\#\#KBDIR\#\#/$kbdir/;
+ unless ($on_windows) {
+ if (m/#include/) {
+ s|\\|\/|g;
+ lc;
+ }
+ }
print OUT;
}
@@ -349,7 +356,6 @@
# Purge remarks and blank lines. Complete source filenames and adapt them to host filesystem.
rectify("rom2.tmp", "rom3.tmp", $k);
-
# scan tmp file and generate auxiliary files, if required
open TMP, "rom3.tmp" or die("Can't open rom3.tmp\n");
while ($line=<TMP>)
@@ -624,69 +630,80 @@
}
else {
# Not blank
+ my $epoc32_line = 0;
$lastblank = 0;
- $line =~ s|##||g; # Delete "token-pasting" ops
+ $line =~ s|\#\#||g; # Delete "token-pasting" ops
$line =~ s|//.*$||g; # Delete trailing c++ comments
# prefix the epocroot dir to occurrences of 'epoc32' in all "KEYWORD=..." lines.
$line =~ s/(=\s*)[\\\/]epoc32/\1${epocroot}epoc32/i;
- if (!defined($1)) { # Not a keyword line.
+ $epoc32_line = defined($1);
+ if (!$epoc32_line) {
+ $line =~ /(=.*$epocroot)/i;
+ $epoc32_line = defined($1);
+ }
+ if (!$epoc32_line) {
if ($k and $line=~/^\s*kerneltrace/i) {
$line = "kerneltrace $k\n";
}
}
+ elsif ($on_windows) {
+ $line =~ s|\/|\\|g;
+ }
elsif ($line =~ /^(\s*\S+\s*=\s*)(\S+)(\s*\S*)/) {
- if ($on_windows) {
- $line =~ s|\/|\\|g;
+ my $keyword_part = $1;
+ my $src = $2;
+ my $dest = $3;
+ $dest =~ s/^\s+//;
+ $dest =~ s/\s+$//;
+ $src =~ s|\\|\/|g;
+ if ($dest) {
+ my ($vol,$dir,$leaf) = File::Spec->splitpath($src);
+ my $lc_leaf = lc($leaf);
+ my $lc_dir = lc($dir);
+ $lc_dir =~ s/\/$//;
+ my $fulldir = $lc_dir;
+ $fulldir =~ s|//|/|g;
+ $dest =~ s|\/|\\|g;
+ $dest = '\\' . $dest, unless ($dest =~ /^\\/);
+ unless ( -d $fulldir ) {
+ chomp $line;
+ # Lower-cased source directory doesn't exist. Give up.
+ die "Guessed source directory \"$fulldir\" does not exist for line $lineno: \"$line\"\n";
+ }
+ if (($leaf eq $lc_leaf) or (-f "$fulldir\/$leaf")) {
+ # Using source directory lowercase and source filename as input.
+ $line = "${keyword_part}${lc_dir}\/${leaf}\t${dest}\n";
+ }
+ elsif ( -f "$fulldir\/$lc_leaf") {
+ # Using source directory source filename both lowercase.
+ $line = "${keyword_part}${lc_dir}\/${lc_leaf}\t${dest}\n";
+ }
+ else { # Harder.
+ my @dirlist;
+ my $found = 0;
+ if (!defined($dir_listings{$fulldir})) {
+ # Haven't got a cached dir listing for the source directory.
+ # Make one now.
+ @dirlist = glob("$fulldir.*");
+ $dir_listings{$fulldir} = \@dirlist;
+ }
+ @dirlist = @{dir_listings{$fulldir}}; # Get listing of source directory from cache.
+ foreach my $file (@dirlist) {
+ # See if any file in the source directory case-insensitively matches the input source file.
+ if ( (-f "$fulldir\/$file") and (lc($file) eq $lc_leaf)) {
+ $line = "${keyword_part}${lc_dir}\/${file}\t${dest}\n";
+ $found = 1;
+ last;
+ }
+ }
+ unless ($found) {
+ die "Cannot find any file case-insensitively matching \"$fulldir\/$leaf\" at line $lineno: \"$line\"\n";
+ }
+ }
}
else {
- my $keyword_part = $1;
- my $src = $2;
- my $dest = $3;
- $src =~ s|\\|\/|g;
- if ($dest) {
- my ($vol,$dir,$leaf) = File::Spec->splitpath($src);
- my $lc_leaf = lc($leaf);
- my $lc_dir = lc($dir);
- $lc_dir =~ s/\/$//;
- my $fulldir = $lc_dir;
- $fulldir =~ s|//|/|g;
- unless ( -d $fulldir ) {
- chomp $line;
- # Lower-cased source directory doesn't exist. Give up.
- die "Guessed source directory \"$fulldir\" does not exist for line $lineno: \"$line\"\n";
- }
- if (($leaf eq $lc_leaf) or (-f "$fulldir\/$leaf")) {
- # Using source directory lowercase and source filename as input.
- $line = "${keyword_part}${lc_dir}\/${leaf}${dest}\n";
- }
- elsif ( -f "$fulldir\/$lc_leaf") {
- # Using source directory source filename both lowercase.
- $line = "${keyword_part}${lc_dir}\/${lc_leaf}${dest}\n";
- }
- else { # Harder.
- my @dirlist;
- my $found = 0;
- if (!defined($dir_listings{$fulldir})) {
- # Haven't got a cached dir listing for the source directory.
- # Make one now.
- @dirlist = glob("$fulldir.*");
- $dir_listings{$fulldir} = \@dirlist;
- }
- @dirlist = @{dir_listings{$fulldir}}; # Get listing of source directory from cache.
- foreach my $file (@dirlist) {
- # See if any file in the source directory case-insensitively matches the input source file.
- if ( (-f "$fulldir\/$file") and (lc($file) eq $lc_leaf)) {
- $line = "${keyword_part}${lc_dir}\/${file}${dest}\n";
- $found = 1;
- last;
- }
- }
- unless ($found) {
- die "Cannot find any file case-insensitively matching \"$fulldir\/$leaf\" at line $lineno: \"$line\"\n";
- }
- }
- }
- }
+ $line =~ s|\\|\/|g;
+ }
}
print OUTPUT_FILE $line;
}
@@ -796,7 +813,6 @@
sub lookupSymbolInfo($$)
{
my ($file, $name) = @_;
-
open TMP, $file or die "Can't read $file\n";
# ignore local symbols.
--- a/sbsv2/raptor/lib/config/variants.xml Wed Oct 06 15:13:17 2010 +0100
+++ b/sbsv2/raptor/lib/config/variants.xml Wed Oct 06 16:32:01 2010 +0100
@@ -116,6 +116,16 @@
<set name="PLATMACROS.VAR" value="GCCE_4 GCCE_4_4"/>
<set name="ARMMACROS.VAR" value="__GCCE_4__ __GCCE_4_4__"/>
</var>
+
+ <var name="gcce4_4_3" extends="gcce_base">
+ <env name="SBS_GCCE443BIN" type="toolchainpath" />
+ <set name="GCCEBIN" value="$(SBS_GCCE443BIN)" />
+ <set name="GCCECC" value="$(GCCEBIN)/arm-none-symbianelf-g++$(DOTEXE)" type="tool" versionCommand="$(GCCECC) -dumpversion" versionResult="4.4.3"/>
+ <set name="RUNTIME_LIBS_LIST" value="drtaeabi.dso dfpaeabi.dso"/>
+ <set name="PLATMACROS.VAR" value="GCCE_4 GCCE_4_4"/>
+ <set name="ARMMACROS.VAR" value="__GCCE_4__ __GCCE_4_4__"/>
+ </var>
+
<var name="rvct2_2" extends="rvct">
<env name="RVCT22BIN" type="toolchainpath"/>