From 8436569a7010a795c87f35b6909a8b8b96d054ed Mon Sep 17 00:00:00 2001 From: Nick Connolly Date: Tue, 23 Feb 2021 10:13:16 +0000 Subject: [PATCH] dpdkbuild: add support for mingw cross build If CONFIG_CROSS_PREFIX includes 'mingw', then specify --cross-file 'config/x86/cross-mingw' which is used as part of regular DPDK testing, so is being maintained. For any other non-null prefix, default to the current error message that automatic cross builds are not supported. Tested by running ./configure --cross-prefix=x86_64-w64-mingw32 and verified that 'make' in dpdkbuild used the cross tools. Signed-off-by: Nick Connolly Change-Id: I75c401dfe8422f6c5f1bbe631695e7ae6118f723 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6530 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Aleksey Marchuk --- dpdkbuild/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dpdkbuild/Makefile b/dpdkbuild/Makefile index 3c058b80e..4a045cbb2 100644 --- a/dpdkbuild/Makefile +++ b/dpdkbuild/Makefile @@ -69,9 +69,13 @@ endif DPDK_OPTS += -Dmachine=$(TARGET_ARCHITECTURE) ifneq ($(CONFIG_CROSS_PREFIX),) +ifeq ($(findstring mingw,$(CONFIG_CROSS_PREFIX)),mingw) +DPDK_OPTS += --cross-file $(SPDK_ROOT_DIR)/dpdk/config/x86/cross-mingw +else $(error Automatic DPDK cross build is not supported. Please compile DPDK manually \ with e.g. `meson build --cross-file config/arm/arm64_armv8_linux_gcc`) endif +endif DPDK_CFLAGS += -fPIC