Build executables as PIE by default

This commit is contained in:
Pierre Pronchery 2021-10-08 21:14:11 +02:00
parent 1a49c1cb00
commit caa81a4f8f
2 changed files with 4 additions and 3 deletions

View File

@ -5,9 +5,9 @@ asflags_force=$(CPPFLAGSF) $(CFLAGSF) -c
asflags=$(CPPFLAGS) $(CFLAGS)
cppflags_force=
cflags_force=-g
cflags=-W -Wall -O2 -D_FORTIFY_SOURCE=2 -fstack-protector
cflags=-W -Wall -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
ldflags_force=-static
ldflags=-Wl,-z,relro -Wl,-z,now
ldflags=-pie -Wl,-z,relro -Wl,-z,now
dist=Makefile,loader.h
mode=amd64-debug

View File

@ -5,7 +5,8 @@ asflags_force=$(CPPFLAGSF) $(CFLAGSF) -c
asflags=$(CPPFLAGS) $(CFLAGS)
cppflags_force=
cflags_force=-g
cflags=-W -Wall -O2 -D_FORTIFY_SOURCE=2 -fstack-protector
cflags=-W -Wall -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
ldflags=-pie -Wl,-z,relro -Wl,-z,now
dist=Makefile
mode=amd64-debug