Skip to content

Commit

Permalink
build as position independent executable
Browse files Browse the repository at this point in the history
  • Loading branch information
bbonev committed Oct 13, 2020
1 parent 2e5f466 commit 6974faf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ ifeq ($(CC),tcc)
CCOPT:=-Wall -I.
else
ifeq ($(CC),clang)
CCOPT:=-Wall -Wextra -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. --std=gnu89
CCOPT:=-Wall -Wextra -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. --std=gnu89 -fPIE
else
ifeq ($(shell uname -s),OpenBSD)
ifeq ($(CC),cc)
CC:=egcc
endif
endif
CCOPT:=-Wall -Wextra -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. --std=gnu89
CCOPT:=-Wall -Wextra -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. --std=gnu89 -fPIE
endif
endif
ifeq ($(CC),egcc)
Expand All @@ -61,7 +61,7 @@ endif
endif

MYCFLAGS=$(DEBUG) $(CPPFLAGS) $(CFLAGS) $(CCOPT)
MYLDFLAGS=$(LDFLAGS)
MYLDFLAGS=$(LDFLAGS) -fPIE -pie

STRIP?=strip

Expand Down

0 comments on commit 6974faf

Please sign in to comment.