Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding rpath linker flag for linux and bsd

  • Loading branch information...
commit 86c2b9a1c65f141b46b559a496d7df65cb056df0 1 parent d403a5e
@FROGGS FROGGS authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 inc/My/Builder/Unix.pm
View
5 inc/My/Builder/Unix.pm
@@ -31,7 +31,10 @@ sub get_additional_libs {
my %rv; # putting detected dir into hash to avoid duplicates
for (keys %$inc_lib_candidates) {
my $ld = $inc_lib_candidates->{$_};
- $rv{"-L$ld"} = 1 if ((-d $_) && (-d $ld));
+ if( -d $_ && -d $ld ) {
+ $rv{"-L$ld"} = 1;
+ $rv{"-Wl,-rpath,$ld"} = 1 if $^O =~ /^linux|dragonfly|.+bsd$/;
+ }
}
push @list, (keys %rv);
push @list, '-lpthread' if ($^O eq 'openbsd');
Please sign in to comment.
Something went wrong with that request. Please try again.