From bbc4e6dbaf432fe7c148fd7f539ddee342db8827 Mon Sep 17 00:00:00 2001 From: chengjinsong2 Date: Thu, 15 Jun 2023 17:21:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chengjinsong2 --- interfaces/innerkits/init_module_engine/BUILD.gn | 2 ++ interfaces/kits/syscap/BUILD.gn | 2 ++ services/modules/reboot/BUILD.gn | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/interfaces/innerkits/init_module_engine/BUILD.gn b/interfaces/innerkits/init_module_engine/BUILD.gn index 3f488733..04c560be 100644 --- a/interfaces/innerkits/init_module_engine/BUILD.gn +++ b/interfaces/innerkits/init_module_engine/BUILD.gn @@ -37,6 +37,7 @@ if (defined(ohos_lite)) { # innerkits for module development # ohos_native_stub_library("libinit_module_engine") { + cflags = [ "-fstack-protector-all" ] output_extension = "so" public_configs = [ ":init_module_engine_exported_config" ] stub_description_file = "./stub/libinit.stub.json" @@ -54,6 +55,7 @@ if (defined(ohos_lite)) { # Generate empty library with symlink name to satisfy init loading required libraries # ohos_native_stub_library("libinit_stub_empty") { + cflags = [ "-fstack-protector-all" ] output_extension = "so" stub_description_file = "./stub/libinit.stub.empty.json" part_name = "init" diff --git a/interfaces/kits/syscap/BUILD.gn b/interfaces/kits/syscap/BUILD.gn index 1d9e81f0..715c6cf4 100644 --- a/interfaces/kits/syscap/BUILD.gn +++ b/interfaces/kits/syscap/BUILD.gn @@ -14,6 +14,7 @@ import("//build/ohos.gni") ohos_shared_library("deviceinfo_ndk") { + cflags = [ "-fstack-protector-all" ] sources = [ "src/deviceinfo.c", "src/syscap_ndk.c", @@ -25,6 +26,7 @@ ohos_shared_library("deviceinfo_ndk") { } ohos_ndk_library("libdeviceinfo_ndk") { + cflags = [ "-fstack-protector-all" ] output_name = "deviceinfo_ndk" ndk_description_file = "./libdeviceinfo.ndk.json" min_compact_version = "1" diff --git a/services/modules/reboot/BUILD.gn b/services/modules/reboot/BUILD.gn index c5e737d4..f1ab962d 100644 --- a/services/modules/reboot/BUILD.gn +++ b/services/modules/reboot/BUILD.gn @@ -16,7 +16,7 @@ import("//build/ohos.gni") ohos_shared_library("rebootmodule") { sources = [ "reboot.c" ] - + cflags = [ "-fstack-protector-all" ] include_dirs = [ ".", "..", @@ -45,6 +45,7 @@ ohos_source_set("libreboot_static") { "reboot_misc.c", "reboot_static.c", ] + cflags = [ "-fstack-protector-all" ] include_dirs = [ ".", "..", -- GitLab