74 lines
3.3 KiB
Diff
74 lines
3.3 KiB
Diff
diff -aurpN a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
|
|
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm 2023-09-08 16:58:12.482566546 +0800
|
|
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm 2023-09-08 17:02:56.171807359 +0800
|
|
@@ -31,6 +31,7 @@ BEGIN {
|
|
$Is{IRIX} = $^O eq 'irix';
|
|
$Is{NetBSD} = $^O eq 'netbsd';
|
|
$Is{Interix} = $^O eq 'interix';
|
|
+ $Is{Linux} = $^O eq 'linux';
|
|
$Is{SunOS4} = $^O eq 'sunos';
|
|
$Is{Solaris} = $^O eq 'solaris';
|
|
$Is{SunOS} = $Is{SunOS4} || $Is{Solaris};
|
|
@@ -1060,7 +1061,7 @@ sub xs_make_dynamic_lib {
|
|
push(@m," \$(RM_F) \$\@\n");
|
|
|
|
my $libs = '$(LDLOADLIBS)';
|
|
- if (($Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
|
|
+ if (($Is{Linux} || $Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
|
|
# Use nothing on static perl platforms, and to the flags needed
|
|
# to link against the shared libperl library on shared perl
|
|
# platforms. We peek at lddlflags to see if we need -Wl,-R
|
|
@@ -1073,6 +1074,11 @@ sub xs_make_dynamic_lib {
|
|
# The Android linker will not recognize symbols from
|
|
# libperl unless the module explicitly depends on it.
|
|
$libs .= ' "-L$(PERL_INC)" -lperl';
|
|
+ } else {
|
|
+ if ($ENV{PERL_CORE}) {
|
|
+ $libs .= ' "-L$(PERL_INC)"';
|
|
+ }
|
|
+ $libs .= ' -lperl';
|
|
}
|
|
}
|
|
|
|
diff -aurpN a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
|
|
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm 1970-01-01 08:00:00.000000000 +0800
|
|
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm 2023-09-08 17:09:16.773017629 +0800
|
|
@@ -0,0 +1,26 @@
|
|
+package ExtUtils::CBuilder::Platform::linux;
|
|
+
|
|
+use strict;
|
|
+use ExtUtils::CBuilder::Platform::Unix;
|
|
+use File::Spec;
|
|
+
|
|
+use vars qw($VERSION @ISA);
|
|
+$VERSION = '0.280236';
|
|
+our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
|
|
+
|
|
+sub link {
|
|
+ my ($self, %args) = @_;
|
|
+ my $cf = $self->{config};
|
|
+
|
|
+ # Link XS modules to libperl.so explicitly because multiple
|
|
+ # dlopen(, RTLD_LOCAL) hides libperl symbols from XS module.
|
|
+ local $cf->{lddlflags} = $cf->{lddlflags};
|
|
+ if ($ENV{PERL_CORE}) {
|
|
+ $cf->{lddlflags} .= ' -L' . $self->perl_inc();
|
|
+ }
|
|
+ $cf->{lddlflags} .= ' -lperl';
|
|
+
|
|
+ return $self->SUPER::link(%args);
|
|
+}
|
|
+
|
|
+1;
|
|
diff -aurpN a/MANIFEST b/MANIFEST
|
|
--- a/MANIFEST 2023-09-08 16:59:28.747862538 +0800
|
|
+++ b/MANIFEST 2023-09-08 17:00:43.036559444 +0800
|
|
@@ -3535,6 +3535,7 @@ dist/ExtUtils-CBuilder/lib/ExtUtils/CBui
|
|
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm CBuilder methods for cygwin
|
|
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm CBuilder methods for darwin
|
|
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm CBuilder methods for OSF
|
|
+dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm CBuilder methods for Linux
|
|
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm CBuilder methods for OS/2
|
|
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm CBuilder methods for Unix
|
|
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm CBuilder methods for VMS
|