Commit 27b920a2 authored by Darek Stojaczyk's avatar Darek Stojaczyk
Browse files

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: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460562


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 2201e2e7
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
@@ -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' \
+2 −2
Original line number Diff line number Diff line
@@ -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.