diff --git a/configure b/configure index 7c42fbdbf..8e391d69b 100755 --- a/configure +++ b/configure @@ -379,9 +379,6 @@ for i in "$@"; do CONFIG[DPDK_LIB_DIR]=$dpdk_libdir CONFIG[DPDK_INC_DIR]=$dpdk_incdir CONFIG[DPDK_PKG_CONFIG]=y - if pkg-config --print-requires libdpdk | grep "libbsd" > /dev/null 2>&1; then - CONFIG[HAVE_LIBBSD]=y - fi CFLAGS="${CFLAGS:+$CFLAGS }$(pkg-config --cflags libdpdk)" check_IPSec_mb "pkg-config" "$dpdk_libdir" "$dpdk_incdir" else @@ -406,19 +403,12 @@ for i in "$@"; do echo "ERROR: do you have another DPDK installed in the system?" exit 1 fi - dpdk_reqs=$(PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$dpdk_libdir/pkgconfig" pkg-config --print-requires libdpdk) - if echo $dpdk_reqs | grep "libbsd" > /dev/null 2>&1; then - CONFIG[HAVE_LIBBSD]=y - fi CFLAGS="${CFLAGS:+$CFLAGS }$(PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$dpdk_libdir/pkgconfig" pkg-config --cflags libdpdk)" dpdk_incdir="${sysroot_dir}$(PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$dpdk_libdir/pkgconfig" pkg-config --variable=includedir libdpdk)" check_IPSec_mb "pkg-config" "$dpdk_libdir" "$dpdk_incdir" else echo "Using $dpdk_incdir/rte_build_config.h for additional libs..." - if grep -F "define RTE_USE_LIBBSD 1" $dpdk_incdir/rte_build_config.h > /dev/null 2>&1; then - CONFIG[HAVE_LIBBSD]=y - fi check_IPSec_mb "build-config" "$dpdk_libdir" "$dpdk_incdir" fi echo "DPDK libraries: $dpdk_libdir" @@ -790,6 +780,12 @@ if [[ $sys_name == "FreeBSD" ]]; then fi fi +if [[ $sys_name == "Linux" ]]; then + if pkg-config libbsd; then + CONFIG[HAVE_LIBBSD]=y + fi +fi + if [[ $sys_name != "Linux" ]]; then if [[ "${CONFIG[VHOST]}" == "y" ]]; then echo "Vhost is only supported on Linux." diff --git a/dpdkbuild/Makefile b/dpdkbuild/Makefile index 7d78cd0cf..fa0a9d9ba 100644 --- a/dpdkbuild/Makefile +++ b/dpdkbuild/Makefile @@ -184,12 +184,6 @@ $(SPDK_ROOT_DIR)/dpdk/build-tmp: $(SPDK_ROOT_DIR)/mk/cc.mk $(SPDK_ROOT_DIR)/incl $(Q)rm -rf $(SPDK_ROOT_DIR)/dpdk/build $(SPDK_ROOT_DIR)/dpdk/build-tmp $(Q)cd "$(SPDK_ROOT_DIR)/dpdk"; CC="$(SUB_CC)" meson setup --prefix="$(MESON_PREFIX)" --libdir lib -Dc_args="$(DPDK_CFLAGS)" -Dc_link_args="$(DPDK_LDFLAGS)" $(DPDK_OPTS) -Denable_drivers="$(shell echo $(DPDK_DRIVERS) | sed -E "s/ +/,/g")" -Ddisable_libs="$(shell echo $(DPDK_DISABLED_LIBS) | sed -E "s/ +/,/g")" $(DPDKBUILD_FLAGS) build-tmp $(Q)sed $(SED_INPLACE_FLAG) 's/#define RTE_EAL_PMD_PATH .*/#define RTE_EAL_PMD_PATH ""/g' $(SPDK_ROOT_DIR)/dpdk/build-tmp/rte_build_config.h - $(Q) \ - # TODO Meson build adds libbsd and/or libarchive dependency when it's available. This means any app will be \ - # forced to link with -lbsd and/or -larchive, but only if it's available on the system. The clean way to \ - # handle this would be to rely on DPDK's pkg-config file which will contain the -lbsd/-larchive when \ - # required. For now just remove the dependencies. DPDK will fallback to its internal functions. - $(Q)sed $(SED_INPLACE_FLAG) 's/#define RTE_USE_LIBBSD .*//g' $(SPDK_ROOT_DIR)/dpdk/build-tmp/rte_build_config.h $(Q)sed $(SED_INPLACE_FLAG) 's/#define RTE_HAS_LIBARCHIVE .*//g' $(SPDK_ROOT_DIR)/dpdk/build-tmp/rte_build_config.h clean: