pluginapi: common: Add support RISC-V architecture type 68/307368/1
authorYunhee Seo <yuni.seo@samsung.com>
Fri, 12 Jan 2024 06:40:32 +0000 (15:40 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Thu, 7 Mar 2024 10:27:13 +0000 (19:27 +0900)
To load plugin backend, this is necessary.

Change-Id: I467baae85265cb45a0a73c8b51a5d4afb1ada484
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
src/plugin-api/common/src/common.h
src/plugin-api/common/src/syscommon-plugin-api-common.c
src/plugin-api/common/src/syscommon-plugin-api-conf.c

index d33b4aea119a4b71da4c8e7aa9998670bf93429c..60178e28720d32c0071ac042602ebe07a684fb32 100644 (file)
@@ -100,7 +100,7 @@ static inline const char* get_backend_library_name(struct __plugin_module_info *
        if (!info)
                return NULL;
 
-#if defined(__aarch64__) || defined(__x86_64__)
+#if defined(__aarch64__) || defined(__x86_64__) || defined(__riscv)
        return info->library_name_64bit;
 #else
        return info->library_name;
index 7ff51d380e79788c89931ef53913127e19125555..a22bdad11d60554f71d794962b609d42c73094c6 100644 (file)
@@ -617,7 +617,7 @@ static int __get_backend_library_data(enum syscommon_plugin_module module,
        DIR *dir;
        char *backend_module_name = NULL;
        int count, i, ret;
-#if defined(__aarch64__) || defined(__x86_64__)
+#if defined(__aarch64__) || defined(__x86_64__) || defined(__riscv)
        const char plugin_backend_path[] = "/usr/lib64/system/plugin";
 #else
        const char plugin_backend_path[] = "/usr/lib/system/plugin";
index 1e25c4aac154674389c36254f2056a55d367331d..fe64d8d5df82f35aff43f3b98edc172c106ce81f 100644 (file)
@@ -122,7 +122,7 @@ static struct __plugin_module_info* _get_module_info_with_library_name(
        new_info->module = info->module;
        new_info->license = info->license;
        new_info->module_name = g_strdup(info->module_name);
-#if defined(__aarch64__) || defined(__x86_64__)
+#if defined(__aarch64__) || defined(__x86_64__) || defined(__riscv)
        new_info->library_name_64bit = g_strdup_printf("/usr/lib64/system/plugin/%s", library_name);
 #else
        new_info->library_name = g_strdup_printf("/usr/lib/system/plugin/%s", library_name);