From 326dd71049fe7f3a55d238315713aa6b7c7239ea Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 29 Apr 2016 08:31:00 -0400 Subject: [PATCH] CFLAGS: Explicitely add RELRO and BIND_NOW options Signed-off-by: Michael Tremer --- macros/cflags.macro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macros/cflags.macro b/macros/cflags.macro index 7474c5db0..c52ef19ff 100644 --- a/macros/cflags.macro +++ b/macros/cflags.macro @@ -2,7 +2,7 @@ # Export CFLAGS + CXXFLAGS GLOBAL_CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Werror=format-security GLOBAL_CFLAGS += -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -GLOBAL_CFLAGS += -grecord-gcc-switches +GLOBAL_CFLAGS += -grecord-gcc-switches -Wl,-z,relro -Wl,-z,now CFLAGS_i686 = -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables CFLAGS_x86_64 = -m64 -mtune=generic @@ -12,4 +12,4 @@ CFLAGS_armv7hl = -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -mthumb export CFLAGS = %{GLOBAL_CFLAGS} %{CFLAGS_%{DISTRO_ARCH}} export CXXFLAGS = %{CFLAGS} -export LDFLAGS = -Wl,-z,relro +export LDFLAGS = -- 2.39.5