11 Star 1 Fork 37

src-openEuler / protobuf

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-add-secure-compile-option.patch 721 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 4cf6dc9f628fc2c5b3478d70e15d4fab8a32ae86 Mon Sep 17 00:00:00 2001
From: zhongtao <zhongtao17@huawei.com>
Date: Wed, 10 Apr 2024 11:43:51 +0800
Subject: [PATCH] add secure compile option
Signed-off-by: zhongtao <zhongtao17@huawei.com>
---
CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4137ce2..d17f09d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,9 @@
# to 3.26.
cmake_minimum_required(VERSION 3.10...3.26)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-z,now -fstack-check -fPIE")
+set(CMAKE_EXE_LINKER_FLAGS "-pie")
+
# Revert to old behavior for MSVC debug symbols.
if(POLICY CMP0141)
cmake_policy(SET CMP0141 OLD)
--
2.25.1
1
https://gitee.com/src-openeuler/protobuf.git
git@gitee.com:src-openeuler/protobuf.git
src-openeuler
protobuf
protobuf
master

搜索帮助