# HG changeset patch # User Mike Kinghan # Date 1286379121 -3600 # Node ID 86492ef8d08612cba5313921cddcec4d79400bdb # Parent b8fa7dfeeaa1316337b631a5de72e1f09c1f1eea 1) Update cross-plat-dev-utils for gcc 4.4.3 2) Fix parameterfileprocessor.c/.h to build with gcc 4.4.3 diff -r b8fa7dfeeaa1 -r 86492ef8d086 cross-plat-dev-utils/fix_epoc32_linux.pl --- 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; diff -r b8fa7dfeeaa1 -r 86492ef8d086 cross-plat-dev-utils/get_wordsize.c --- 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); } diff -r b8fa7dfeeaa1 -r 86492ef8d086 cross-plat-dev-utils/patch-files/linux/linux_build/sbsv2/raptor/lib/config/gcc.xml --- 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 @@ + + + + + @@ -43,7 +48,7 @@ - + @@ -74,10 +79,11 @@ - + + - + @@ -85,19 +91,21 @@ - - - + + + + - + + - - + + diff -r b8fa7dfeeaa1 -r 86492ef8d086 imgtools/imglib/parameterfileprocessor/include/parameterfileprocessor.h --- 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; diff -r b8fa7dfeeaa1 -r 86492ef8d086 imgtools/imglib/parameterfileprocessor/source/parameterfileprocessor.cpp --- 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) { diff -r b8fa7dfeeaa1 -r 86492ef8d086 imgtools/romtools/rombuild/romnibus.pl --- 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() { - 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=) @@ -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. diff -r b8fa7dfeeaa1 -r 86492ef8d086 sbsv2/raptor/lib/config/variants.xml --- 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 @@ + + + + + + + + + +