代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 2e36e8a3885563d12eac0e5cbed56ddaf1d28e27 Mon Sep 17 00:00:00 2001
From: jiangheng <jiangheng14@huawei.com>
Date: Thu, 14 Jul 2022 22:05:57 +0800
Subject: [PATCH 09/19] enable-secure-compile-and-open-compile-log
---
src/lstack/Makefile | 2 +-
src/ltran/CMakeLists.txt | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/lstack/Makefile b/src/lstack/Makefile
index 8fc2435..98289d8 100644
--- a/src/lstack/Makefile
+++ b/src/lstack/Makefile
@@ -21,7 +21,7 @@ OPTIMIZATION = -O2 -g
RM = rm -f
LDFLAGS = -shared -ldl -lm -lpthread -lrt -lnuma -lconfig -lboundscheck
-SEC_FLAGS = -fstack-protector-strong -Werror -Wall -Wl,-z,relro,-z,now -Wl,-z,noexecstack -Wtrampolines -fPIC
+SEC_FLAGS = -fstack-protector-strong -Werror -Wall -Wl,-z,relro, -Wl,-z,now -Wl,-z,noexecstack -Wtrampolines -fPIC -D_FORTIFY_SOURCE=2
INC = -I$(LSTACK_DIR)/include \
-I$(LSTACK_DIR)/../common \
diff --git a/src/ltran/CMakeLists.txt b/src/ltran/CMakeLists.txt
index c21d88a..970bc1b 100644
--- a/src/ltran/CMakeLists.txt
+++ b/src/ltran/CMakeLists.txt
@@ -13,7 +13,8 @@ project(ltran)
set(COMMON_DIR ${PROJECT_SOURCE_DIR}/../common)
-set(CMAKE_C_FLAGS "-O2 -g -fstack-protector-strong -Wall -Werror -fPIE -pie -pthread")
+set(CMAKE_VERBOSE_MAKEFILE ON)
+set(CMAKE_C_FLAGS "-g -fstack-protector-strong -Wall -Werror -fPIE -pie -pthread -D_FORTIFY_SOURCE=2 -O2 -fPIC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D LTRAN_COMPILE")
if($ENV{GAZELLE_COVERAGE_ENABLE})
@@ -57,4 +58,4 @@ set_target_properties(ltran PROPERTIES LINK_FLAGS "-L$ENV{DPDK_LIB_PATH} -Wl,--w
add_executable(gazellectl ltran_dfx.c ${COMMON_DIR}/gazelle_dfx_msg.c)
target_include_directories(gazellectl PRIVATE $ENV{DPDK_INCLUDE_FILE} ${COMMON_DIR})
-target_link_libraries(gazellectl PRIVATE boundscheck)
+target_link_libraries(gazellectl PRIVATE boundscheck -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack)
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。