From 08765f32c4a8e523c7df2b9a2cedb8ddefa8aef9 Mon Sep 17 00:00:00 2001 From: Otavio Pontes Date: Fri, 29 Mar 2019 13:05:05 -0700 Subject: [PATCH] Makefile: Adding extra compiler flags Signed-off-by: Otavio Pontes --- Makefile.am | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 5c9a115a..6fe89aa5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,11 +2,12 @@ SUFFIXES= .rst EXTRA_DIST = COPYING scripts/findstatic.pl swupd.bash -AM_CFLAGS = -fPIC -g -D_FORTIFY_SOURCE=2 -fno-common -std=gnu99 \ +AM_CFLAGS = -fPIE -fPIC -g -D_FORTIFY_SOURCE=2 -fno-common -std=gnu99 \ -O$(OPTIMIZE) \ -Wall \ -Wextra \ -Wformat-security \ + -Wformat \ -Wlogical-op \ -Wunreachable-code \ -Wswitch-default \ @@ -15,7 +16,11 @@ AM_CFLAGS = -fPIC -g -D_FORTIFY_SOURCE=2 -fno-common -std=gnu99 \ -Winline \ -Wundef \ -Wnested-externs \ - -Wredundant-decls + -Wredundant-decls \ + -fstack-protector-strong + +AM_LDFLAGS = -z noexecstack -z relro -z now \ + -pie ACLOCAL_AMFLAGS = -I m4