Skip to content

Commit 4eb1d19

Browse files
Håkon HæglandHåkon Hægland
authored andcommitted
Add -rpath when compiling XS modules on macOS.
This fixes issue Perl-Toolchain-Gang#402 This change fixes issue Perl-Toolchain-Gang#402 on my machine.
1 parent c6acf0b commit 4eb1d19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ExtUtils/MM_Unix.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,8 +1049,8 @@ sub xs_make_dynamic_lib {
10491049
$ldfrom = "-all $ldfrom -none" if $Is{OSF};
10501050

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

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

0 commit comments

Comments
 (0)