Add hardening flags

This commit is contained in:
Tiiffi
2024-12-06 21:53:14 +02:00
parent 0fb17971c0
commit 2bb1fafdaa

View File

@ -15,7 +15,7 @@ RM = rm -v -f
CC ?= gcc
CFLAGS = -std=gnu99 -Wall -Wextra -Wpedantic -Wno-gnu-zero-variadic-macro-arguments -O2
EXTRAFLAGS ?= -fstack-protector-all
EXTRAFLAGS ?= -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIE -pie -Wl,-z,relro -Wl,-z,now -fno-common
ifeq ($(OS), Windows_NT)
LINKER = -lws2_32