From 94cc085f2890fefd1f91c38b245262c4da232e02 Mon Sep 17 00:00:00 2001 From: zhuhengbo 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 --- 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