From 89ebf52938a828075b9fb60b3ad7b518bc1f7090 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 1 Aug 2017 13:47:10 +0200 Subject: [PATCH] make: add -rpath only on non-Darwin POSIX I didn't recall this doesn't work on Darwin. --- config.mk | 2 +- platform.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.mk b/config.mk index c1bd74d99..e7db4577a 100644 --- a/config.mk +++ b/config.mk @@ -28,7 +28,7 @@ XXD_LUA := ./scripts/embed-lua.sh INSTALL := install # Flags -BUILD_LDFLAGS += "-Wl,-rpath=$(LIBDIR)" $(LDFLAGS) +BUILD_LDFLAGS += $(LDFLAGS) BUILD_CFLAGS := $(CFLAGS) -std=c99 -D_GNU_SOURCE -Wno-unused -Wtype-limits -Wformat -Wformat-security -Wall -I$(abspath .) -I$(abspath lib/generic) -I$(abspath contrib) -I$(abspath contrib/lmdb) BUILD_CFLAGS += -DPACKAGE_VERSION="\"$(VERSION)\"" -DPREFIX="\"$(PREFIX)\"" -DMODULEDIR="\"$(MODULEDIR)\"" ifeq (,$(findstring -O,$(CFLAGS))) diff --git a/platform.mk b/platform.mk index ad3367c18..b56be0226 100644 --- a/platform.mk +++ b/platform.mk @@ -43,7 +43,7 @@ else SOVER = $(if $(1), -compatibility_version $(2) -current_version $(1),) else PLATFORM := POSIX - LDFLAGS += -pthread -lm -Wl,-E + LDFLAGS += -pthread -lm -Wl,-E "-Wl,-rpath=$(LIBDIR)" # ELF hardening options ifneq ($(HARDENING),no) BINFLAGS += -pie -- 2.47.2