Switch to -fPIE

Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
Peter Jones 2019-11-19 13:23:14 -05:00 committed by Nigel Croxon
parent cc4ef911ee
commit 368cdf1265
1 changed files with 2 additions and 2 deletions

View File

@ -166,10 +166,10 @@ endif
INCDIR += -I$(SRCDIR) -I$(TOPDIR)/inc -I$(TOPDIR)/inc/$(ARCH) \
-I$(TOPDIR)/inc/protocol
# Only enable -fpic for non MinGW compilers (unneeded on MinGW)
# Only enable -fPIE for non MinGW compilers (unneeded on MinGW)
GCCMACHINE := $(shell $(CC) -dumpmachine)
ifneq (mingw32,$(findstring mingw32, $(GCCMACHINE)))
CFLAGS += -fpic
CFLAGS += -fPIE
endif
ifeq (FreeBSD, $(findstring FreeBSD, $(OS)))