From 41c38d982d84767cffff70d96f3e9b222d8704ac Mon Sep 17 00:00:00 2001 From: mikaelh Date: Thu, 25 Jul 2013 15:10:24 +0300 Subject: [PATCH] Added linker flags that allow bundling libgmp.so with the binary release on Linux. --- bitcoin-qt-win64.pro | 3 +++ bitcoin-qt.pro | 3 +++ src/makefile.unix | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/bitcoin-qt-win64.pro b/bitcoin-qt-win64.pro index 87a67464..99f8eeb9 100644 --- a/bitcoin-qt-win64.pro +++ b/bitcoin-qt-win64.pro @@ -35,6 +35,9 @@ contains(RELEASE, 1) { !win32:!macx { # Linux: static link and extra security (see: https://wiki.debian.org/Hardening) LIBS += -Wl,-Bstatic -Wl,-z,relro -Wl,-z,now + + # Linux: Enable bundling libgmp.so with the binary + LIBS += -Wl,-rpath,\\\$$ORIGIN } } diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro index 764d249b..157a83e2 100644 --- a/bitcoin-qt.pro +++ b/bitcoin-qt.pro @@ -35,6 +35,9 @@ contains(RELEASE, 1) { !win32:!macx { # Linux: static link and extra security (see: https://wiki.debian.org/Hardening) LIBS += -Wl,-Bstatic -Wl,-z,relro -Wl,-z,now + + # Linux: Enable bundling libgmp.so with the binary + LIBS += -Wl,-rpath,\\\$$ORIGIN } } diff --git a/src/makefile.unix b/src/makefile.unix index c955da6f..a366050e 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -61,6 +61,12 @@ ifneq (${USE_IPV6}, -) DEFS += -DUSE_IPV6=$(USE_IPV6) endif +ifeq ($(RELEASE), 1) + # Linux: Enable bundling libgmp.so with the binary + LIBS += -Wl,-rpath,\$$ORIGIN +endif + + LIBS+= \ -Wl,-B$(LMODE2) \ -l z \