From https://github.com/NixOS/nix/pull/236
@ -32,8 +32,10 @@ ifeq ($(BUILD_SHARED_LIBS), 1)
GLOBAL_CFLAGS += -fPIC
GLOBAL_CXXFLAGS += -fPIC
ifneq ($(OS), Darwin)
ifneq ($(OS), SunOS)
GLOBAL_LDFLAGS += -Wl,--no-copy-dt-needed-entries
endif
SET_RPATH_TO_LIBS ?= 1