Skip to content

Commit

Permalink
Add -rpath when compiling XS modules on macOS.
Browse files Browse the repository at this point in the history
This fixes issue Perl-Toolchain-Gang#402

This change fixes issue Perl-Toolchain-Gang#402 on my machine.
  • Loading branch information
Håkon Hægland authored and khwilliamson committed Dec 12, 2021
1 parent 535e823 commit 5353bdb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ExtUtils/MM_Unix.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1049,8 +1049,8 @@ sub xs_make_dynamic_lib {
$ldfrom = "-all $ldfrom -none" if $Is{OSF};

# The IRIX linker doesn't use LD_RUN_PATH
my $ldrun = $Is{IRIX} && $self->{LD_RUN_PATH} ?
qq{-rpath "$self->{LD_RUN_PATH}"} : '';
my $ldrun = ($Is{IRIX} || $^O eq "darwin") && $self->{LD_RUN_PATH} ?
qq{-rpath "$self->{LD_RUN_PATH}"} : '';

# For example in AIX the shared objects/libraries from previous builds
# linger quite a while in the shared dynalinker cache even when nobody
Expand Down

0 comments on commit 5353bdb

Please sign in to comment.