From: Giulio Benetti Date: Fri, 14 Jun 2019 12:25:08 +0000 (+0200) Subject: Makefile: fix -pie linking according to --disable-pie X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a71536ec80a3dc03e83dd87ccd67f6a66ecc573;p=thirdparty%2Ftvheadend.git Makefile: fix -pie linking according to --disable-pie Only compilation follows './configure --disable-pie', linking instead doesn't, because '-pie' flag is passed to LDFLAGS uncoditionally. So add '-pie' flag only if CONFIG_PIE=yes. Signed-off-by: Giulio Benetti --- diff --git a/Makefile b/Makefile index 41783b546..4e5a947a3 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,10 @@ LDFLAGS += -ldl -lm else LDFLAGS += -ldl -lpthread -lm endif -LDFLAGS += -pie -Wl,-z,now +ifeq ($(CONFIG_PIE),yes) +LDFLAGS += -pie +endif +LDFLAGS += -Wl,-z,now ifeq ($(CONFIG_LIBICONV),yes) LDFLAGS += -liconv endif