diff --git a/CHANGELOG.md b/CHANGELOG.md index dccaffc38..18cef14eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,16 @@ spdk_nvme_ns_get_extended_sector_size() was added. This function includes the metadata size per sector (if any). spdk_nvme_ns_get_sector_size() still returns only the data size per sector, not including metadata. +### Build System + +New `configure` options, `--with-shared` and `--without-shared` +[default], provide the capability to build, or not, SPDK shared libraries. +This includes the single SPDK shared lib encompassing all of the SPDK +static libs as well as individual SPDK shared libs corresponding to +each of the SPDK static ones. Although the production of the shared +libs conforms with conventional version naming practices, such naming +does not at this time confer any SPDK ABI compatibility claims. + ## v18.07: ### bdev diff --git a/CONFIG b/CONFIG index c41b6890e..c3b30bcac 100644 --- a/CONFIG +++ b/CONFIG @@ -107,3 +107,6 @@ CONFIG_RAID?=n # Enable the dependencies for building the crypto vbdev CONFIG_CRYPTO?=n + +# Build spdk shared libraries in addition to the static ones. +CONFIG_SHARED?=n diff --git a/Makefile b/Makefile index 273f0119e..2bb661a83 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,9 @@ S := SPDK_ROOT_DIR := $(CURDIR) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk -DIRS-y += lib shared_lib examples app include +DIRS-y += lib +DIRS-$(CONFIG_SHARED) += shared_lib +DIRS-y += examples app include DIRS-$(CONFIG_TESTS) += test .PHONY: all clean $(DIRS-y) config.h CONFIG.local mk/cc.mk cc_version cxx_version diff --git a/configure b/configure index 8baa8e7fb..3dd02e379 100755 --- a/configure +++ b/configure @@ -51,6 +51,8 @@ function usage() echo " No path required." echo " rdma [disabled]" echo " No path required." + echo " shared Required to build spdk shared libraries." + echo " No path required." echo " iscsi-initiator [disabled]" echo " No path required." echo " raid [disabled]" @@ -158,6 +160,12 @@ for i in "$@"; do --without-rdma) CONFIG_RDMA=n ;; + --with-shared) + CONFIG_SHARED=y + ;; + --without-shared) + CONFIG_SHARED=n + ;; --with-iscsi-initiator) CONFIG_ISCSI_INITIATOR=y ;; @@ -291,7 +299,7 @@ if [ "$CONFIG_ASAN" = "y" -a "$CONFIG_TSAN" = "y" ]; then exit 1 fi -if [[ "$OSTYPE" == "FreeBSD"* ]]; then +if [[ "$OSTYPE" == "freebsd"* ]]; then # FreeBSD doesn't support all configurations if [[ "$CONFIG_COVERAGE" == "y" ]]; then echo "ERROR: CONFIG_COVERAGE not available on FreeBSD" @@ -369,6 +377,9 @@ fi if [ -n "$CONFIG_RDMA" ]; then echo "CONFIG_RDMA?=$CONFIG_RDMA" >> CONFIG.local fi +if [ -n "$CONFIG_SHARED" ]; then + echo "CONFIG_SHARED?=$CONFIG_SHARED" >> CONFIG.local +fi if [ -n "$CONFIG_ISCSI_INITIATOR" ]; then echo "CONFIG_ISCSI_INITIATOR?=$CONFIG_ISCSI_INITIATOR" >> CONFIG.local fi @@ -415,7 +426,7 @@ echo $python_command > PYTHON_COMMAND $python_command scripts/genconfig.py > config.h echo "done." -if [[ "$OSTYPE" == "FreeBSD"* ]]; then +if [[ "$OSTYPE" == "freebsd"* ]]; then echo "Type 'gmake' to build." else echo "Type 'make' to build."