加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0163-Add-support-for-arch-ppc64le.patch 1.47 KB
一键复制 编辑 原始数据 按行查看 历史
yinbin6 提交于 2024-04-07 20:49 . sync patch: add support for arch ppc64le
From e89442aa3aebae9896a5d5dac0e397e5da16f8de Mon Sep 17 00:00:00 2001
From: Ren Zhijie <zhijie.ren@shingroup.cn>
Date: Mon, 25 Mar 2024 16:46:08 +0800
Subject: [PATCH] Add support for arch ppc64le
Signed-off-by: Ren Zhijie <zhijie.ren@shingroup.cn>
---
src/ltran/CMakeLists.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/ltran/CMakeLists.txt b/src/ltran/CMakeLists.txt
index a484ae3..2eb7d70 100644
--- a/src/ltran/CMakeLists.txt
+++ b/src/ltran/CMakeLists.txt
@@ -63,6 +63,9 @@ if (DPDK_VERSION GREATER_EQUAL 23.11)
set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -lrte_log -larchive -Wl,-lrte_eal")
else()
set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -lrte_kni -Wl,-Bstatic -lrte_eal -Wl,-Bdynamic")
+ if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "ppc64le")
+ set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -Wl,-larchive")
+ endif()
endif()
add_executable(ltran main.c ltran_param.c ltran_config.c ltran_ethdev.c ltran_stat.c ltran_errno.c
@@ -79,7 +82,7 @@ target_compile_options(ltran PRIVATE -fno-strict-aliasing -D__ARM_FEATURE_CRC32=
-Wdeprecated -Wwrite-strings -Wno-implicit-fallthrough -D_FORTIFY_SOURCE=2 -Wno-error=deprecated-declarations)
# gcc coredump in openEuler-20.03-LTS-XX aarch64 when add -march=native
-if(NOT CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "sw_64|aarch64" )
+if(NOT CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "sw_64|aarch64|ppc64le" )
target_compile_options(ltran PRIVATE -march=native -Wcast-align)
endif()
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化