!14 适配嵌入式环境,修复编译问题
From: @s-c-c Reviewed-by: @yukaii Signed-off-by: @yukaii
This commit is contained in:
commit
4121daea46
33
0001-feat-for-embedded-fix-config_safwk-include_dirs.patch
Normal file
33
0001-feat-for-embedded-fix-config_safwk-include_dirs.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From 17be025e940fea23e6fdb7019f08fe9b3d656b91 Mon Sep 17 00:00:00 2001
|
||||
From: s_c_c <shichuchao@huawei.com>
|
||||
Date: Mon, 1 Apr 2024 20:14:11 +0800
|
||||
Subject: [PATCH] feat for embedded fix config_safwk include_dirs
|
||||
|
||||
---
|
||||
services/safwk/BUILD.gn | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/services/safwk/BUILD.gn b/services/safwk/BUILD.gn
|
||||
index e25ecb9..09a6acc 100644
|
||||
--- a/services/safwk/BUILD.gn
|
||||
+++ b/services/safwk/BUILD.gn
|
||||
@@ -12,6 +12,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/ohos.gni")
|
||||
+import("//build/config/sysroot.gni")
|
||||
|
||||
################################################################################
|
||||
config("config_safwk") {
|
||||
@@ -20,7 +21,7 @@ config("config_safwk") {
|
||||
"//foundation/systemabilitymgr/safwk/services/safwk/include",
|
||||
"//foundation/systemabilitymgr/samgr/services/lsamgr/include",
|
||||
"//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk",
|
||||
- "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include",
|
||||
+ "${sysroot}/usr/include/ipc",
|
||||
]
|
||||
}
|
||||
|
||||
--
|
||||
2.20.1 (Apple Git-117)
|
||||
|
||||
@ -13,24 +13,24 @@
|
||||
|
||||
import("//build/ohos.gni")
|
||||
import("//build/ohos_var.gni")
|
||||
import("//build/config/sysroot.gni")
|
||||
|
||||
# 建立所需头文件链接
|
||||
exec_script("//build/openeuler/script/link.py", [ "--src_target", "/usr/include/safwk/system_ability.h", "--dest_target",
|
||||
exec_script("//build/openeuler/script/link.py", [ "--src_target", "${sysroot}/usr/include/safwk/system_ability.h", "--dest_target",
|
||||
rebase_path("//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk/system_ability.h") ], "string")
|
||||
|
||||
exec_script("//build/openeuler/script/link.py", [ "--src_target", "/usr/include/safwk", "--dest_target",
|
||||
exec_script("//build/openeuler/script/link.py", [ "--src_target", "${sysroot}/usr/include/safwk", "--dest_target",
|
||||
rebase_path("//foundation/systemabilitymgr/safwk/services/safwk/include") ], "string")
|
||||
|
||||
config("system_ability_config") {
|
||||
visibility = [ ":*" ]
|
||||
include_dirs = [
|
||||
"../../../services/safwk/include",
|
||||
"//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk",
|
||||
"${sysroot}/usr/include/safwk",
|
||||
]
|
||||
}
|
||||
|
||||
ohos_prebuilt_shared_library("system_ability_fwk") {
|
||||
source = "/usr/lib64/libsystem_ability_fwk.z.so"
|
||||
source = "${sysroot}/usr/lib64/libsystem_ability_fwk.z.so"
|
||||
|
||||
public_configs = [ ":system_ability_config" ]
|
||||
|
||||
|
||||
10
safwk.spec
10
safwk.spec
@ -6,7 +6,7 @@
|
||||
|
||||
Name: systemabilitymgr_safwk
|
||||
Version: 1.0.0
|
||||
Release: 3
|
||||
Release: 5
|
||||
Summary: System ability manager
|
||||
License: Apache-2.0
|
||||
Url: https://gitee.com/openharmony/systemabilitymgr_safwk
|
||||
@ -18,6 +18,7 @@ Source5: start_services.sh
|
||||
Source6: stop_services.sh
|
||||
|
||||
Patch1: 0000-remove-dependency-on-hitrace-safwk.patch
|
||||
Patch2: 0001-feat-for-embedded-fix-config_safwk-include_dirs.patch
|
||||
|
||||
BuildRequires: gcc, make, hilog, libboundscheck
|
||||
BuildRequires: libatomic,libicu-devel, libxml2-devel, cjson-devel
|
||||
@ -51,6 +52,7 @@ mkdir -p %{samgr_dir}
|
||||
%setup -q -D -T -a 1 -c -n %{samgr_dir}
|
||||
# patch命令统一使用-P来指定第几个patch
|
||||
%patch -P1 -p1 -d %{samgr_dir}/safwk
|
||||
%patch -P2 -p1 -d %{samgr_dir}/safwk
|
||||
|
||||
%build
|
||||
rm -rf %{_builddir}/out
|
||||
@ -107,6 +109,12 @@ ln -s /usr/include/safwk/system_ability.h %{safwk_path}/interfaces/innerkits/saf
|
||||
%{build_opt}/*
|
||||
|
||||
%changelog
|
||||
* Tue Apr 2 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-5
|
||||
- Fix BUILD.gn sysroot path for embedded
|
||||
|
||||
* Mon Apr 1 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-4
|
||||
- Fix config_safwk include_dirs for embedded
|
||||
|
||||
* Wed Mar 27 2024 tianhang <tian_hang@hoperun.com> - 1.0.0-3
|
||||
- update version to 1.0.0-3
|
||||
-
|
||||
|
||||
@ -12,9 +12,10 @@
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/ohos.gni")
|
||||
import("//build/config/sysroot.gni")
|
||||
|
||||
ohos_prebuilt_executable("sa_main") {
|
||||
source = "/usr/bin/sa_main"
|
||||
source = "${sysroot}/usr/bin/sa_main"
|
||||
install_enable = true
|
||||
|
||||
part_name = "safwk"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user