configure: detect IBV_WR_SEND_WITH_INV instead checking version
Checking version of libibverbs is error prone as custom version might be installed that implements needed features but version number is not incremented. Instead test if we can compile with needed features. Fixes #524 Change-Id: I18e9ca923eea92b124e95a5f660955a01afad5c4 Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-on: https://review.gerrithub.io/c/443387 (master) Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447587 Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
40e461cbb7
commit
9f6a6b1942
17
configure
vendored
17
configure
vendored
@ -359,20 +359,9 @@ fi
|
||||
|
||||
if [ "${CONFIG[RDMA]}" = "y" ]; then
|
||||
if [ "$OSTYPE" != "FreeBSD"* ]; then
|
||||
ibv_lib_file="$(ldconfig -p | grep 'libibverbs.so ' || true)"
|
||||
if [ ! -z "$ibv_lib_file" ]; then
|
||||
ibv_lib_file="${ibv_lib_file##*=> }"
|
||||
ibv_lib_file="$(readlink -f $ibv_lib_file)" || true
|
||||
fi
|
||||
|
||||
if [ -z $ibv_lib_file ]; then
|
||||
ibv_lib_file="libibverbs.so.0.0.0"
|
||||
fi
|
||||
|
||||
ibv_ver_str="$(basename $ibv_lib_file)"
|
||||
ibv_maj_ver=`echo $ibv_ver_str | cut -d. -f3`
|
||||
ibv_min_ver=`echo $ibv_ver_str | cut -d. -f4`
|
||||
if [[ "$ibv_maj_var" -gt 1 || ("$ibv_maj_ver" -eq 1 && "$ibv_min_ver" -ge 1) ]]; then
|
||||
if echo -e '#include <infiniband/verbs.h>\n \
|
||||
int main(void){ return !!IBV_WR_SEND_WITH_INV; }\n' \
|
||||
| ${CC:-cc} ${CFLAGS} -x c -c -o /dev/null - 2>/dev/null; then
|
||||
CONFIG[RDMA_SEND_WITH_INVAL]="y"
|
||||
else
|
||||
CONFIG[RDMA_SEND_WITH_INVAL]="n"
|
||||
|
Loading…
Reference in New Issue
Block a user