X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FExtUtils%2FLiblist.pm;h=c7c6f7755517f200d4f7b2141120691147ea02ad;hb=84a9aad5c224d0cf574731960d4cf03373a57222;hp=48c0ad53ead0b685da0efeb8fdcb9d7456c38f8e;hpb=0a022e8e9f2eec4dde5e31513c787e06f89c8a31;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/ExtUtils/Liblist.pm b/lib/ExtUtils/Liblist.pm index 48c0ad5..c7c6f77 100644 --- a/lib/ExtUtils/Liblist.pm +++ b/lib/ExtUtils/Liblist.pm @@ -1,7 +1,5 @@ package ExtUtils::Liblist; -no warnings 'ambiguous'; # silence the -f() file tests. - @ISA = qw(ExtUtils::Liblist::Kid File::Spec); sub lsdir { @@ -23,10 +21,10 @@ package ExtUtils::Liblist::Kid; # This kid package is to be used by MakeMaker. It will not work if # $self is not a Makemaker. -use 5.005_64; +use 5.006_001; # Broken out of MakeMaker from version 4.11 -our $VERSION = substr q$Revision: 1.26 $, 10; +our $VERSION = substr q$Revision: 1.27 $, 10; use Config; use Cwd 'cwd'; @@ -70,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; }