diff options
author | David Bremner <bremner@debian.org> | 2012-03-03 20:33:47 -0400 |
---|---|---|
committer | gregor herrmann <gregoa@debian.org> | 2018-08-06 18:26:56 -0300 |
commit | 254147a9fe3bd8e76387f83954dbcd62f7a1da5a (patch) | |
tree | 838545dd732d0441931637796151fcbce7dba162 | |
parent | fa30358929897f1e1a32c30db66ae42aec2930cb (diff) |
disable rpath if installing into /usr/lib
rpath isn't needed then, and setting has some undesirable
side-effects, the more obvious being that it prevents relocating the
libraries in the files system.
Gbp-Pq: Name 0002-disable-rpath-if-installing-into-usr-lib.patch
-rw-r--r-- | inc/MyBuilder.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/inc/MyBuilder.pm b/inc/MyBuilder.pm index 2a43b6f..9b78d97 100644 --- a/inc/MyBuilder.pm +++ b/inc/MyBuilder.pm @@ -219,8 +219,14 @@ sub ACTION_create_binaries { print STDERR "\n** Creating binaries (",join(", ", map { $_.$EXEEXT } @BINARIES), ")\n"; + my $rpath_arg = ''; + + if ( ($^O !~ /darwin/) && $btparselibdir ne "/usr/lib") { + $rpath_arg = "-Wl,-R${btparselibdir}"; + } + my $extra_linker_flags = sprintf("-Lbtparse/src %s -lbtparse ", - ($^O !~ /darwin/)?"-Wl,-R${btparselibdir}":""); + $rpath_arg); my @toinstall; |