summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlex <qt-info@nokia.com>2010-12-03 14:50:32 +1000
committerAlex <qt-info@nokia.com>2010-12-03 14:50:32 +1000
commit1af40f756eca16ca9694268d8fa95783b6d0880f (patch)
treeb3d16855831ff9416fcfc3557c270ddc8a440218 /bin
parent8fdffc12cbe8b4f901c512b498188bc1741e20d1 (diff)
move compilercheck script into /bin
all scripts are in bin
Diffstat (limited to 'bin')
-rw-r--r--bin/compilercheck.pl41
1 files changed, 41 insertions, 0 deletions
diff --git a/bin/compilercheck.pl b/bin/compilercheck.pl
new file mode 100644
index 0000000000..93d9cc600b
--- /dev/null
+++ b/bin/compilercheck.pl
@@ -0,0 +1,41 @@
+#!/usr/bin/perl
+# use module
+
+my $result = `sbs --query=config[armv5_urel] 2>&1`;
+my $count = length($result);
+my $idx = index($result, "arm.v5.urel.rvct");
+
+print "check sbs release armv5 default compiler...\n";
+if ($idx > 0 && $count > ($idx + 20)){
+ $version_hig = substr($result, $idx+16, 1);
+ $version_low = substr($result, $idx+18, 1);
+ print "- sbs default release armv5 compiler found: RVCT" . $version_hig . "." . $version_low . "\n";
+
+ # check if RVCT in sbs config is < 4.0
+ if($version_hig < 4 && $version_hig >= 2){
+ #check installed ARM compiler version
+ $result = `armcc 2>&1`;
+ if( index($result, "RVCT") > 0){
+ $idx = index($result, ".");
+ $rvctversion_hig = substr($result, $idx-1, 1);
+ $rvctversion_low = substr($result, $idx+1, 1);
+ print "- installed RVCT compiler: RVCT". $rvctversion_hig . "." . $rvctversion_low . "\n";
+ #check if installed RVCT is >= 4.0
+ if( $rvctversion_hig >= 4){
+ #check if the variable QT_RVCT_VERSION is set to the rvct version
+ $qtvarval = $ENV{'QT_RVCT_VERSION'};
+ $qtvarshould = $rvctversion_hig. "." .$rvctversion_low;
+ if((length($qtvarval) <= 0) || ($qtvarshould != $qtvarval)){
+ print "- Please set enviroment variable QT_RVCT_VERSION=";
+ print "$rvctversion_hig.$rvctversion_low and run configure again!!!\n";
+ }
+ }
+ }
+ else{
+ print "- OK\n";
+ }
+ }
+}
+else{
+ print "- OK\n";
+}