From 1af40f756eca16ca9694268d8fa95783b6d0880f Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 3 Dec 2010 14:50:32 +1000 Subject: move compilercheck script into /bin all scripts are in bin --- bin/compilercheck.pl | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 bin/compilercheck.pl (limited to 'bin') 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"; +} -- cgit v1.2.3