From 8a74d28d297bd3d0fafb180c11b7d10a3d40b27a Mon Sep 17 00:00:00 2001 From: huangji Date: Wed, 9 Apr 2025 09:42:47 +0800 Subject: [PATCH 1/2] add riscv64 support Signed-off-by: huangji --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 40f147c..594f9f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -161,6 +161,8 @@ if (OS_ARCH STREQUAL "aarch64") endif (USE_H1620) add_compile_options(-mtune=cortex-a72 -fsigned-char -g -ggdb3 -march=armv8-a+crc -funwind-tables) +elseif (OS_ARCH STREQUAL "riscv64") + add_compile_options(-march=rv64gc) else () add_compile_options(-msse4.2 ) endif () -- Gitee From 0ceb5c68e8fc55fb0455a6974771aebb7e02fa9f Mon Sep 17 00:00:00 2001 From: huangji Date: Wed, 9 Apr 2025 09:55:11 +0800 Subject: [PATCH 2/2] fix gcc build error Signed-off-by: huangji --- CMakeLists.txt | 2 +- src/common/dss_ga.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 594f9f9..860edd4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -162,7 +162,7 @@ if (OS_ARCH STREQUAL "aarch64") add_compile_options(-mtune=cortex-a72 -fsigned-char -g -ggdb3 -march=armv8-a+crc -funwind-tables) elseif (OS_ARCH STREQUAL "riscv64") - add_compile_options(-march=rv64gc) + add_compile_options(-march=rv64gc -mno-strict-align -Warray-bounds=0 -Wno-unused-result) else () add_compile_options(-msse4.2 ) endif () diff --git a/src/common/dss_ga.h b/src/common/dss_ga.h index a2deb37..846c252 100644 --- a/src/common/dss_ga.h +++ b/src/common/dss_ga.h @@ -136,7 +136,7 @@ void ga_reset_app_pools(); void ga_set_pool_def(ga_pool_id_e pool_id, const ga_pool_def_t *def); status_t ga_create_global_area(void); void ga_destroy_global_area(void); -int32 ga_attach_area(uint32 attach_perm); +status_t ga_attach_area(uint32 attach_perm); void ga_detach_area(void); uint32 ga_get_pool_usage(ga_pool_id_e pool_id); -- Gitee