Change 13567 by jhi@alpha on 2001/12/09 21:09:10
Apply NetBSD patch-af: handle both -[LR] and -Wl,-R linker paths.
Affected files ...
.... //depot/perl/lib/ExtUtils/Liblist.pm#32 edit
Differences ...
==== //depot/perl/lib/ExtUtils/Liblist.pm#32 (text) ====
Index: perl/lib/ExtUtils/Liblist.pm
--- perl/lib/ExtUtils/Liblist.pm.~1~ Sun Dec 9 14:15:05 2001
+++ perl/lib/ExtUtils/Liblist.pm Sun Dec 9 14:15:05 2001
@@ -68,20 +68,28 @@
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;
}
End of Patch.