dpdk/0002-dpdk-add-secure-option-in-makefile.patch
wu-changsheng 8a5e80b3c6 add support for gazelle
Signed-off-by: wu-changsheng <851744572@qq.com>
2021-04-06 18:46:52 +08:00

36 lines
997 B
Diff

From 94cc085f2890fefd1f91c38b245262c4da232e02 Mon Sep 17 00:00:00 2001
From: zhuhengbo <zhuhengbo1@huawei.com>
Date: Thu, 19 Mar 2020 17:31:31 +0800
Subject: [PATCH] dpdk: add secure option in makefile.
reason: add secure option in makefile.
Signed-off-by: zhuhengbo <zhuhengbo1@huawei.com>
---
mk/exec-env/linux/rte.vars.mk | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/mk/exec-env/linux/rte.vars.mk b/mk/exec-env/linux/rte.vars.mk
index bea3f76..6844281 100644
--- a/mk/exec-env/linux/rte.vars.mk
+++ b/mk/exec-env/linux/rte.vars.mk
@@ -11,10 +11,13 @@
#
# examples for RTE_EXEC_ENV: linux, freebsd
#
+
+SEC_FLAGS = -fstack-protector-all -Wall -Wl,-z,relro,-z,now -Wl,-z,noexecstack -Wtrampolines -fPIC
+
ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
-EXECENV_CFLAGS = -pthread -fPIC
+EXECENV_CFLAGS = -pthread -fPIC $(SEC_FLAGS)
else
-EXECENV_CFLAGS = -pthread
+EXECENV_CFLAGS = -pthread $(SEC_FLAGS)
endif
# include in every library to build
--
2.19.1