aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/buildfile
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-08-27 15:49:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-08-27 15:49:09 +0200
commitc148d4c35419607354fd1cecd1aaa776e7b71569 (patch)
treeeeb9a94814a3fc56114454044e41b3ea4955556d /libbuild2/buildfile
parentbe34c36f7b9ab7d2fd0d3a7bc2a0f5f62ff4fe67 (diff)
Force use of RPATH instead of RUNPATH on Linux
RUNPATH messes up our use of dlopen().
Diffstat (limited to 'libbuild2/buildfile')
-rw-r--r--libbuild2/buildfile10
1 files changed, 9 insertions, 1 deletions
diff --git a/libbuild2/buildfile b/libbuild2/buildfile
index 881b6e8..b536eba 100644
--- a/libbuild2/buildfile
+++ b/libbuild2/buildfile
@@ -94,8 +94,16 @@ if! $cross
obja{context}: cxx.poptions += -DLIBBUILD2_STATIC_BUILD
objs{context}: cxx.poptions += -DLIBBUILD2_SHARED_BUILD
-if ($cxx.target.class != "windows")
+if ($cxx.target.class != 'windows')
{
+ if ($cxx.target.class == 'linux')
+ {
+ # Make sure we use RPATH and not RUNPATH since the latter messes up
+ # dlopen().
+ #
+ cxx.loptions += -Wl,--disable-new-dtags
+ }
+
cxx.libs += -lpthread
if ($cxx.target.class != "bsd")