#!/bin/sh
check_version(){
-gcc_ver=`gcc -dumpversion`
-gcc_ver_number=`echo $gcc_ver | cut -d . -f 1`
-gcc_ver_subnumber=`echo $gcc_ver | cut -d . -f 2`
-gcc_ver=$(($gcc_ver_number*1000+$gcc_ver_subnumber))
-#if [ `gcc --version | grep 'gcc (GCC) .*' | cut -b 11-13` == "3.2" ] ; then
+gcc_ver=`gcc -dumpversion | awk -F. '{ print $1 * 1000 + $2 }'`
if [ $gcc_ver -eq 3002 ] ; then
return 0
fi
fi
if [ -n "${gcc_root}" ] ; then
gcc_root=`cd ${gcc_root}/..; pwd`
- gcc_ver=`gcc -dumpversion`
- gcc_ver_number=`echo $gcc_ver | cut -d . -f 1`
- gcc_ver_subnumber=`echo $gcc_ver | cut -d . -f 2`
- gcc_ver=$(($gcc_ver_number*1000+$gcc_ver_subnumber))
- #if [ "`${gcc_root}/bin/gcc --version | grep 'gcc (GCC) .*' | cut -b 11-13`" = "3.2" ] ; then
+ gcc_ver=`gcc -dumpversion | awk -F. '{ print $1 * 1000 + $2 }'`
if [ $gcc_ver -ge 3002 ] ; then
tmp="\${GCC_ROOT}/bin ${gcc_root}/bin \${PATH} ${PATH}";
path=`sort_path ${tmp}`