!40 spdk在arm服务器上编译报错补丁
From: @Zht-Try Reviewed-by: @liuzhiqiang26 Signed-off-by: @liuzhiqiang26
This commit is contained in:
commit
668f0bc69a
@ -0,0 +1,47 @@
|
||||
From de8f3a50ee33c8218ba59bc16297e953121206d7 Mon Sep 17 00:00:00 2001
|
||||
From: root <root@wls-x86-hp04.shanghai.arm.com>
|
||||
Date: Fri, 19 Mar 2021 15:38:55 +0800
|
||||
Subject: [PATCH] mk: Fix debug build error on ARM ThunderX2 and neoverse N1
|
||||
platform
|
||||
|
||||
When building spdk on ARM platform like thunderx2 with --enable-debug,
|
||||
there are following error:
|
||||
|
||||
/tmp/ccOBb4AF.s: Assembler messages:
|
||||
/tmp/ccOBb4AF.s:45: Error: selected processor does not support `casp x0,x1,x2,x3,[x4]'
|
||||
/tmp/ccOBb4AF.s:77: Error: selected processor does not support `caspa x0,x1,x2,x3,[x4]'
|
||||
/tmp/ccOBb4AF.s:109: Error: selected processor does not support `caspl x0,x1,x2,x3,[x4]'
|
||||
/tmp/ccOBb4AF.s:141: Error: selected processor does not support `caspal x0,x1,x2,x3,[x4]'
|
||||
|
||||
The reason is that DPDK is built with -march=armv8.1-a or -march=armv8.2-a+lse which
|
||||
have these instructions while SPDK is built with -march=armv8-a+crc which does not support
|
||||
them. Change spdk build machine to native can fix this.
|
||||
|
||||
Signed-off-by: Rui Chang <rui.chang@arm.com>
|
||||
Change-Id: I759d4ce2c557ce5ff73a802d7a4b6579c4ba64f7
|
||||
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7025
|
||||
Community-CI: Mellanox Build Bot
|
||||
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
|
||||
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
|
||||
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
|
||||
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
|
||||
---
|
||||
mk/spdk.common.mk | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/mk/spdk.common.mk b/mk/spdk.common.mk
|
||||
index 633a05bda79..897be4d2150 100644
|
||||
--- a/mk/spdk.common.mk
|
||||
+++ b/mk/spdk.common.mk
|
||||
@@ -77,11 +77,7 @@
|
||||
ifneq ($(filter powerpc%,$(TARGET_MACHINE)),)
|
||||
COMMON_CFLAGS += -mcpu=$(TARGET_ARCHITECTURE)
|
||||
else ifeq ($(TARGET_MACHINE),aarch64)
|
||||
-ifeq ($(TARGET_ARCHITECTURE),native)
|
||||
-COMMON_CFLAGS += -march=armv8-a+crc
|
||||
-else
|
||||
COMMON_CFLAGS += -march=$(TARGET_ARCHITECTURE)
|
||||
-endif
|
||||
COMMON_CFLAGS += -DPAGE_SIZE=$(shell getconf PAGESIZE)
|
||||
else
|
||||
COMMON_CFLAGS += -march=$(TARGET_ARCHITECTURE)
|
||||
@ -0,0 +1,53 @@
|
||||
From fcc389490a4abe26c1efe6cc624dc2925ed6b670 Mon Sep 17 00:00:00 2001
|
||||
From: Rui Chang <rui.chang@arm.com>
|
||||
Date: Tue, 18 May 2021 15:32:56 +0800
|
||||
Subject: [PATCH] configure: add gcc version check for ARM Neoverse-N1 platform
|
||||
|
||||
When doing debug build on ARM Neoverse-N1 platform, if gcc version is
|
||||
lower than 8.4.0, we may met following errors:
|
||||
|
||||
/tmp/cc24qua1.s: Assembler messages:
|
||||
/tmp/cc24qua1.s:53: Error: selected processor does not support `casp x0,x1,x2,x3,[x4]'
|
||||
/tmp/cc24qua1.s:85: Error: selected processor does not support `caspa x0,x1,x2,x3,[x4]'
|
||||
/tmp/cc24qua1.s:117: Error: selected processor does not support `caspl x0,x1,x2,x3,[x4]'
|
||||
/tmp/cc24qua1.s:149: Error: selected processor does not support `caspal x0,x1,x2,x3,[x4]'
|
||||
|
||||
The change also fix the problem by pass armv8.2-a+crypto as target architecture.
|
||||
|
||||
Signed-off-by: Rui Chang <rui.chang@arm.com>
|
||||
Change-Id: I2053b9440e06873066480d63e471802df2e69d4e
|
||||
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7949
|
||||
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
|
||||
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
|
||||
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
|
||||
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
|
||||
Community-CI: Mellanox Build Bot
|
||||
---
|
||||
configure | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 7d063f4ef3b..a2d0c5a62fb 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -786,6 +786,20 @@ exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
+# For ARM Neoverse-N1 platform, debug build needs gcc version newer than 8.4
|
||||
+if [[ "${CONFIG[DEBUG]}" = "y" && $arch = aarch64* && "$CC_TYPE" = "gcc" ]]; then
|
||||
+ GCC_VERSION=$($CC -dumpfullversion)
|
||||
+ PART_NUM=$(grep -i -m 1 "CPU part" /proc/cpuinfo | awk '{print $4}')
|
||||
+
|
||||
+ if [[ "$(printf '%s\n' "8.4.0" "$GCC_VERSION" | sort -V | head -n1)" != "8.4.0" ]]; then
|
||||
+ if [[ $PART_NUM = 0xd0c ]]; then
|
||||
+ echo "WARNING: For ARM Neoverse-N1 platform, debug build needs GCC version newer than 8.4."
|
||||
+ echo " Will work around this by using armv8.2-a+crypto as target architecture for now."
|
||||
+ CONFIG[ARCH]=armv8.2-a+crypto
|
||||
+ fi
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
# We are now ready to generate final configuration. But first do sanity
|
||||
# check to see if all keys in CONFIG array have its reflection in CONFIG file.
|
||||
if [ $(egrep -c "^\s*CONFIG_[[:alnum:]_]+=" $rootdir/CONFIG) -ne ${#CONFIG[@]} ]; then
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
Name: spdk
|
||||
Version: 21.01.1
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: Set of libraries and utilities for high performance user-mode storage
|
||||
License: BSD and MIT
|
||||
URL: http://spdk.io
|
||||
@ -21,6 +21,8 @@ Patch10: 0010-spdk_top-check-return-value-of-strdup-in-store_last_.patch
|
||||
Patch11: 0011-uring-set-fd-to-1-after-close-fd-in-uring_sock_creat.patch
|
||||
Patch12: 0012-spdk-use-fstack-protector-strong-instead-of-fstack-p.patch
|
||||
Patch13: 0013-lib-vhost-Fix-compilation-with-dpdk-21.11.patch
|
||||
Patch14: 0014-mk-Fix-debug-build-error-on-ARM-ThunderX2-and-neoverse_N1_platform.patch
|
||||
Patch15: 0015-configure-add-gcc-version-check-for-ARM-Neoverse-N1_platform.patch
|
||||
|
||||
%define package_version %{version}-%{release}
|
||||
|
||||
@ -174,6 +176,9 @@ mv doc/output/html/ %{install_docdir}
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Feb 25 2022 Hongtao Zhang <zhanghongtao22@huawei.com> - 21.01.1-3
|
||||
- Fix build error on ARM ThunderX2 and neoverse N1 platform
|
||||
|
||||
* Mon Jan 10 2022 Weifeng Su <suweifeng1@huawei.com> - 21.01.1-2
|
||||
- Adapt for dpdk 21.11
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user