Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cnf/configure_func.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ checkfunc d_fchmod 'fchmod' "0,0" 'unistd.h sys/stat.h'
checkfunc d_fchmodat 'fchmodat' "0,NULL,0,0" 'unistd.h sys/stat.h'
checkfunc d_fchown 'fchown' "0,0,0" 'unistd.h'
checkfunc d_fcntl 'fcntl' "0,0" 'unistd.h fcntl.h'
checkfunc d_fdopendir 'fdopendir' "0" 'dirent.h sys/types.h'
checkfunc d_fdclose 'fdclose' "NULL,NULL" 'stdio.h'
checkfunc d_ffs 'ffs' "0" 'strings.h'
checkfunc d_ffsl 'ffsl' "0" 'strings.h'
Expand Down
1 change: 1 addition & 0 deletions cnf/diffs/perl5-5.42.0/constant.patch
1 change: 1 addition & 0 deletions cnf/diffs/perl5-5.42.0/dynaloader.patch
1 change: 1 addition & 0 deletions cnf/diffs/perl5-5.42.0/findext.patch
1 change: 1 addition & 0 deletions cnf/diffs/perl5-5.42.0/installscripts.patch
70 changes: 70 additions & 0 deletions cnf/diffs/perl5-5.42.0/liblist.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
index fbdc79aea2..976fd268aa 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
@@ -20,9 +20,10 @@ use File::Basename;
use File::Spec;

sub ext {
- if ( $^O eq 'VMS' ) { goto &_vms_ext; }
- elsif ( $^O eq 'MSWin32' ) { goto &_win32_ext; }
- else { goto &_unix_os2_ext; }
+ if ( $Config{usemmldlt} ){ goto &_ld_ext; }
+ elsif ( $^O eq 'VMS' ) { goto &_vms_ext; }
+ elsif ( $^O eq 'MSWin32' ) { goto &_win32_ext; }
+ else { goto &_unix_os2_ext; }
}

sub _space_dirs_split {
@@ -643,4 +644,51 @@ sub _vms_ext {
wantarray ? ( $lib, '', $ldlib, '', ( $give_libs ? \@flibs : () ) ) : $lib;
}

+# A direct test for -l validity.
+# Because guessing real file names for -llib options when dealing
+# with a cross compiler is generally a BAD IDEA^tm.
+sub _ld_ext {
+ my($self,$potential_libs, $verbose, $give_libs) = @_;
+ $verbose ||= 0;
+
+ if ($^O =~ 'os2' and $Config{perllibs}) {
+ # Dynamic libraries are not transitive, so we may need including
+ # the libraries linked against perl.dll again.
+
+ $potential_libs .= " " if $potential_libs;
+ $potential_libs .= $Config{perllibs};
+ }
+ return ("", "", "", "", ($give_libs ? [] : ())) unless $potential_libs;
+ warn "Potential libraries are '$potential_libs':\n" if $verbose;
+
+ my($ld) = $Config{ld};
+ my($ldflags) = $Config{ldflags};
+ my($libs) = defined $Config{perllibs} ? $Config{perllibs} : $Config{libs};
+
+ my $try = 'try_mm.c';
+ my $tryx = 'try_mm.x';
+ open(TRY, '>', $try) || die "Can't create MakeMaker test file $try: $!\n";
+ print TRY "int main(void) { return 0; }\n";
+ close(TRY);
+
+ my $testlibs = '';
+ my @testlibs = ();
+ foreach my $thislib (split ' ', $potential_libs) {
+ $testlibs = join(' ', @testlibs);
+ if($thislib =~ /^-L/) {
+ push(@testlibs, $thislib);
+ next
+ };
+ my $cmd = "$ld $ldflags -o $tryx $try $testlibs $thislib >/dev/null 2>&1";
+ my $ret = system($cmd);
+ warn "Warning (mostly harmless): " . "No library found for $thislib\n" if $ret;
+ next if $ret;
+ push @testlibs, $thislib;
+ }
+ unlink($try);
+ unlink($tryx);
+
+ return (join(' ', @testlibs), '', join(' ', @testlibs), '');
+}
+
1;
1 change: 1 addition & 0 deletions cnf/diffs/perl5-5.42.0/makemaker.patch
1 change: 1 addition & 0 deletions cnf/diffs/perl5-5.42.0/posix-makefile.patch
1 change: 1 addition & 0 deletions cnf/diffs/perl5-5.42.0/test-checkcase.patch
1 change: 1 addition & 0 deletions cnf/diffs/perl5-5.42.0/test-makemaker.patch
1 change: 1 addition & 0 deletions cnf/diffs/perl5-5.42.0/xconfig.patch