diff --git a/data/bin/setgcc b/data/bin/setgcc index 866dc6cfc4..3d54123f1a 100755 --- a/data/bin/setgcc +++ b/data/bin/setgcc @@ -79,7 +79,8 @@ if [ -z "$gcc" ]; then fi # check whether the gcc exists -if [ ! -e $abiDir/$arch/$gcc/tools/current/bin/*gcc ]; then +count=`ls $abiDir/$arch/$gcc/tools/current/bin/*gcc 2>/dev/null | wc -l` +if [ $count -eq 0 ]; then echo "Can't set GCC $arch/$gcc -- not installed." >&2 exit 1 fi