Commit b18f19d8 authored by Darek Stojaczyk's avatar Darek Stojaczyk Committed by Ben Walker
Browse files

configure: run rte_vhost gcc check explicitly with -Werror



We check rte_vhost version by trying to compile a program
using a public rte_vhost API function. We only compile the
program - without linking it - because rte_vhost has
a number of dependencies on other libs and we want to keep
the configure script simple. However, the function could
be still implicitly declared by the compiler, making the
compilation succeed when it should not.

To fix it, compile that test program with -Werror.

Change-Id: I0f187dfec909f7cd5cacb7b7a2fc21f5816c4632
Signed-off-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457778


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 9e3d841d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -376,7 +376,8 @@ if [ -z "${CONFIG[ENV]}" ]; then
			# program, just compile it
			if ! echo -e '#include <rte_vhost.h>\n' \
				'int main(void) { return rte_vhost_extern_callback_register(0, NULL, NULL); }\n' \
				| $BUILD_CMD -c -Wno-deprecated-declarations -I"${CONFIG[DPDK_DIR]}/include" -; then
				| $BUILD_CMD -c -Wno-deprecated-declarations -Werror \
				-I"${CONFIG[DPDK_DIR]}/include" -; then
				echo "Notice: DPDK's rte_vhost not found or version < 19.05, using internal," \
				     "legacy rte_vhost library."
				CONFIG[VHOST_INTERNAL_LIB]=y