From fcc9a23a1b50c6e3d179488c7e73c159477f2184 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 15 Feb 2005 10:59:38 +0000 Subject: [PATCH] Modify check version number procedure for gcc --- config_files/gcc-3.2.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/config_files/gcc-3.2.sh b/config_files/gcc-3.2.sh index e148073..506ade8 100755 --- a/config_files/gcc-3.2.sh +++ b/config_files/gcc-3.2.sh @@ -1,11 +1,7 @@ #!/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 @@ -34,11 +30,7 @@ if [ -z "${gcc_root}" ] ; then 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}` -- 2.39.2