13 Star 5 Fork 32

src-openEuler/gazelle

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0178-add-riscv64-support.patch 1.91 KB
一键复制 编辑 原始数据 按行查看 历史
yc555 提交于 2024-05-10 14:45 . sync add riscv64 support
From c17a61a4e7872af8eabdf213f71ff8aad84687ad Mon Sep 17 00:00:00 2001
From: laokz <zhangkai@iscas.ac.cn>
Date: Thu, 9 May 2024 18:44:28 +0800
Subject: [PATCH] add riscv64 support
---
src/lstack/Makefile | 2 +-
src/ltran/CMakeLists.txt | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lstack/Makefile b/src/lstack/Makefile
index d2c039d..ace33bd 100644
--- a/src/lstack/Makefile
+++ b/src/lstack/Makefile
@@ -109,7 +109,7 @@ else
$(LIB_PATH)/librte_net_virtio.so \
$(LIB_PATH)/librte_telemetry.so \
$(LIB_PATH)/librte_pcapng.so
- ifneq ($(ARCH), loongarch64)
+ ifeq ($(filter loongarch64 riscv64, $(ARCH)),)
LIBRTE_LIB += $(LIB_PATH)/librte_net_i40e.so
endif
endif
diff --git a/src/ltran/CMakeLists.txt b/src/ltran/CMakeLists.txt
index 2eb7d70..fee3a94 100644
--- a/src/ltran/CMakeLists.txt
+++ b/src/ltran/CMakeLists.txt
@@ -54,7 +54,7 @@ if (DPDK_VERSION STREQUAL "19.11")
else()
set(DPDK_LINK_FLAGS "-Wl,-lrte_net_bond -Wl,-lrte_net_hinic -Wl,-lrte_net_ixgbe \
-Wl,-lpcap -Wl,-lrte_net_pcap -Wl,-lrte_net_virtio -Wl,-lrte_pcapng -Wl,-lrte_telemetry")
- if(NOT CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "loongarch64")
+ if(NOT CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "loongarch64|riscv64")
set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -Wl,-lrte_net_i40e")
endif()
endif()
@@ -82,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|ppc64le" )
+if(NOT CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "sw_64|aarch64|ppc64le|riscv64" )
target_compile_options(ltran PRIVATE -march=native -Wcast-align)
endif()
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/gazelle.git
git@gitee.com:src-openeuler/gazelle.git
src-openeuler
gazelle
gazelle
master

搜索帮助