Do not hardcode -pie and allow the user to drop it (e.g. PIE could be enabled or disabled by the buildsystem such as buildroot) Signed-off-by: Fabrice Fontaine <fontaine.fabrice@xxxxxxxxx> --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7c221a89..a5269687 100644 --- a/Makefile +++ b/Makefile @@ -137,7 +137,11 @@ LDFLAGS = -Wl,-z,now,-z,noexecstack # If you want a static binary, you might uncomment these # LDFLAGS += -static # STRIP = -s -LDLIBS = -ldl -pie +LDLIBS = -ldl +USE_PIE = 1 +ifdef USE_PIE +LDLIBS += -pie +endif # To explicitly disable libudev, set -DNO_LIBUDEV in CXFLAGS ifeq (, $(findstring -DNO_LIBUDEV, $(CXFLAGS))) -- 2.43.0