Add -z relro to the linker command line and -D_FORTIFY_SOURCE=2
for the preprocessor.
# Export CFLAGS + CXXFLAGS
# Export CFLAGS + CXXFLAGS
-GLOBAL_CFLAGS = -O2 -g -pipe -Wall -Werror=format-security
+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 += -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4
GLOBAL_CFLAGS += -grecord-gcc-switches
export CFLAGS = %{GLOBAL_CFLAGS} %{CFLAGS_%{DISTRO_ARCH}}
export CXXFLAGS = %{CFLAGS}
export CFLAGS = %{GLOBAL_CFLAGS} %{CFLAGS_%{DISTRO_ARCH}}
export CXXFLAGS = %{CFLAGS}
+export LDFLAGS = -Wl,-z,relro