diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-09 21:09:10 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-09 21:09:10 +0000 |
commit | 571b764929975cea697f7f11a3b6375f1dc81d7c (patch) | |
tree | f3314138a490f9da449e613a749d72a22bde48b6 /lib | |
parent | 5d1c421cd665bb8544e1a2b5a7e6923df02753d0 (diff) | |
download | perl-571b764929975cea697f7f11a3b6375f1dc81d7c.tar.gz |
Apply NetBSD patch-af: handle both -[LR] and -Wl,-R linker paths.
p4raw-id: //depot/perl@13567
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ExtUtils/Liblist.pm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/ExtUtils/Liblist.pm b/lib/ExtUtils/Liblist.pm index 09421e331f..c7c6f77555 100644 --- a/lib/ExtUtils/Liblist.pm +++ b/lib/ExtUtils/Liblist.pm @@ -68,20 +68,28 @@ sub _unix_os2_ext { foreach $thislib (split ' ', $potential_libs){ # Handle possible linker path arguments. - if ($thislib =~ s/^(-[LR])//){ # save path flag type + if ($thislib =~ s/^(-[LR]|-Wl,-R)//){ # save path flag type my($ptype) = $1; unless (-d $thislib){ warn "$ptype$thislib ignored, directory does not exist\n" if $verbose; next; } + my($rtype) = $ptype; + if (($ptype eq '-R') or ($ptype eq '-Wl,-R')) { + if ($Config{'lddlflags'} =~ /-Wl,-R/) { + $rtype = '-Wl,-R'; + } elsif ($Config{'lddlflags'} =~ /-R/) { + $rtype = '-R'; + } + } unless ($self->file_name_is_absolute($thislib)) { warn "Warning: $ptype$thislib changed to $ptype$pwd/$thislib\n"; $thislib = $self->catdir($pwd,$thislib); } push(@searchpath, $thislib); push(@extralibs, "$ptype$thislib"); - push(@ldloadlibs, "$ptype$thislib"); + push(@ldloadlibs, "$rtype$thislib"); next; } |