From b4386076374706816d68c1d2573fde4aee775a39 Mon Sep 17 00:00:00 2001 From: Ludovic 'Archivist' Lagouardette Date: Sat, 15 Aug 2020 11:27:08 +0200 Subject: [PATCH] Added security flags for the release build --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0ed9e7e..3147ad0 100644 --- a/Makefile +++ b/Makefile @@ -54,8 +54,8 @@ debug_executable: CXXFLAGS += -DDEBUG -g debug_executable: build $(APP_DIR)/$(TARGET) gdb $(APP_DIR)/$(TARGET) -release_executable: CFLAGS += -O3 -march=native -release_executable: CXXFLAGS += -O3 -march=native +release_executable: CFLAGS += -O2 -march=native -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param ssp-buffer-size=4 -fPIE -pie -Wl,-z,relro,-z,now +release_executable: CXXFLAGS += -O2 -march=native -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param ssp-buffer-size=4 -fPIE -pie -Wl,-z,relro,-z,now release_executable: build $(APP_DIR)/$(TARGET) #############################