build: fix detect_cc.sh script for icc
icc -v prints out its version string like this: icc version 18.0.1 (gcc version 5.0.0 compatibility) detect_cc.sh gets confused and does this in the generated mk/cc.mk: CC_TYPE=icc gcc So fix detect_cc.sh to only use the first entry with head -1. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I44680ac83f165f8d4d8ef6448c0a7d7aa93b85e7 Reviewed-on: https://review.gerrithub.io/399262 Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
15e2fa5dac
commit
5d027b5b06
@ -52,8 +52,8 @@ for i in "$@"; do
|
||||
esac
|
||||
done
|
||||
|
||||
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 }')
|
||||
CC_TYPE=$($CC -v 2>&1 | grep -o -E '\w+ version' | head -1 | awk '{ print $1 }')
|
||||
CXX_TYPE=$($CXX -v 2>&1 | grep -o -E '\w+ version' | head -1 | awk '{ print $1 }')
|
||||
LD_TYPE=$(ld -v 2>&1 | awk '{print $2}')
|
||||
|
||||
if [ "$CC_TYPE" != "$CXX_TYPE" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user