From b18f19d8a713e4cfdc9b82ea74ff65c1cdcfa537 Mon Sep 17 00:00:00 2001 From: Darek Stojaczyk Date: Wed, 12 Jun 2019 12:28:32 +0200 Subject: [PATCH] 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: Darek Stojaczyk Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457778 Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Ben Walker --- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index f22b5bb001..bfbba787f9 100755 --- a/configure +++ b/configure @@ -376,7 +376,8 @@ if [ -z "${CONFIG[ENV]}" ]; then # program, just compile it if ! echo -e '#include \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