configure: unset CONFIG_VHOST on BSD

Remove linux #ifdefs from the vhost code and just
implicitly disable CONFIG_VHOST for BSD systems.

This serves as cleanup.

Change-Id: I8b0e0e8f80478f50ca8586cc974f7afcee2566f0
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460562
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Darek Stojaczyk 2019-07-04 21:51:04 +02:00
parent 2201e2e701
commit 27b920a2a4
3 changed files with 13 additions and 7 deletions

View File

@ -38,11 +38,6 @@
#include "spdk/event.h"
#include "spdk/vhost.h"
/* TODO: this should be handled by configure */
#if defined(SPDK_CONFIG_VHOST) && !defined(__linux__)
#undef SPDK_CONFIG_VHOST
#endif
#ifdef SPDK_CONFIG_VHOST
#define SPDK_VHOST_OPTS "S:"
#else

11
configure vendored
View File

@ -431,6 +431,17 @@ if [[ "$OSTYPE" == "freebsd"* ]]; then
fi
fi
if [[ "$OSTYPE" == "freebsd"* ]]; then
if [[ "${CONFIG[VHOST]}" == "y" ]]; then
echo "Vhost is only supported on Linux. Disabling it."
CONFIG[VHOST]="n"
fi
if [[ "${CONFIG[VIRTIO]}" == "y" ]]; then
echo "Virtio is only supported on Linux. Disabling it."
CONFIG[VIRTIO]="n"
fi
fi
if [ "${CONFIG[RDMA]}" = "y" ]; then
if ! echo -e '#include <infiniband/verbs.h>\n#include <rdma/rdma_verbs.h>\n' \
'int main(void) { return 0; }\n' \

View File

@ -39,10 +39,10 @@ DIRS-y += bdev blob blobfs conf copy event json jsonrpc \
ut_mock iscsi notify
ifeq ($(OS),Linux)
DIRS-y += nbd ftl
DIRS-$(CONFIG_VHOST) += vhost
DIRS-$(CONFIG_VIRTIO) += virtio
endif
DIRS-$(CONFIG_VHOST) += vhost
DIRS-$(CONFIG_VIRTIO) += virtio
DIRS-$(CONFIG_REDUCE) += reduce
# If CONFIG_ENV is pointing at a directory in lib, build it.