detect_cc.sh: further fix CC_TYPE generation

FreeBSD clang prepends "FreeBSD" before clang in the
version string, so further fixes are needed.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7bfc37322483b97443985f1103ff753d1b18a87a
This commit is contained in:
Jim Harris 2017-05-10 16:27:17 -07:00 committed by Daniel Verkamp
parent 905551da05
commit 54a5aba7ee

View File

@ -52,8 +52,8 @@ for i in "$@"; do
esac
done
CC_TYPE=$($CC -v 2>&1 | grep -w version | awk '{print $1}')
CXX_TYPE=$($CXX -v 2>&1 | grep -w version | awk '{print $1}')
CC_TYPE=$($CC -v 2>&1 | grep -o -E '\w+ version' | awk '{ print $1 }')
CXX_TYPE=$($CXX -v 2>&1 | grep -o -E '\w+ version' | awk '{ print $1 }')
LD_TYPE=$(ld -v 2>&1 | awk '{print $2}')
if [ "$CC_TYPE" != "$CXX_TYPE" ]; then