fix build with mingw64

build failed with mingw64 due to usage of "PIE" option on system without explicit PIE
This commit is contained in:
Dorian Fevrier 2021-01-02 16:29:45 +01:00
parent 7b23651028
commit be0912f510

View file

@ -193,6 +193,20 @@ else
LDFLAGS += -no-pie
endif
ifdef PIE
ifeq ($(PIE), 1)
CFLAGS += -fPIE
LDFLAGS += -pie
else
ifeq ($(PIE), 0)
CFLAGS += -fno-PIE
LDFLAGS += -no-pie
else
$(error Invalid PIE value.)
endif
endif
endif
# set installation options
ifeq ($(PREFIX),)
PREFIX := /usr/local