commit 622734eb1afdabecf49a04ca14a1f3fb53d5dc5b Author: Petr Písař <ppisar@xxxxxxxxxx> Date: Wed Jul 3 12:53:36 2013 +0200 Link XS modules to libperl.so with EU::CBuilder on Linux ...ules-to-libperl.so-with-EU-CBuilder-on-Li.patch | 65 ++++++++++++++++++++ perl.spec | 6 ++ 2 files changed, 71 insertions(+), 0 deletions(-) --- diff --git a/perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch b/perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch new file mode 100644 index 0000000..d87aca7 --- /dev/null +++ b/perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch @@ -0,0 +1,65 @@ +From b598ba3f2d4b8347c6621cff022b8e2329b79ea5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@xxxxxxxxxx> +Date: Wed, 3 Jul 2013 11:01:02 +0200 +Subject: [PATCH] Link XS modules to libperl.so with EU::CBuilder on Linux +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +<https://bugzilla.redhat.com/show_bug.cgi?id=960048> +<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327585#50> + +Signed-off-by: Petr Písař <ppisar@xxxxxxxxxx> +--- + MANIFEST | 1 + + .../lib/ExtUtils/CBuilder/Platform/linux.pm | 26 ++++++++++++++++++++++ + 2 files changed, 27 insertions(+) + create mode 100644 dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm + +diff --git a/MANIFEST b/MANIFEST +index 397252a..d7c519b 100644 +--- a/MANIFEST ++++ b/MANIFEST +@@ -3093,6 +3093,7 @@ dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm CBuilder methods fo + 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 +diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm +new file mode 100644 +index 0000000..e3251c4 +--- /dev/null ++++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm +@@ -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.280206'; ++@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; +-- +1.8.1.4 + diff --git a/perl.spec b/perl.spec index e37a4c6..fbba888 100644 --- a/perl.spec +++ b/perl.spec @@ -102,6 +102,9 @@ Patch15: perl-5.16.3-create_libperl_soname.patch # Install libperl.so to -Dshrpdir value Patch16: perl-5.16.3-Install-libperl.so-to-shrpdir-on-Linux.patch +# Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048 +Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch + # Update some of the bundled modules # see http://fedoraproject.org/wiki/Perl/perl.spec for instructions @@ -1884,6 +1887,7 @@ tarball from perl.org. %patch14 -p1 %patch15 -p1 %patch16 -p1 +%patch200 -p1 %if !%{defined perl_bootstrap} # Local patch tracking @@ -1904,6 +1908,7 @@ perl -x patchlevel.h \ 'Fedora Patch14: Do not use system Term::ReadLine::Gnu in tests (RT#118821)' \ 'Fedora Patch15: Define SONAME for libperl.so' \ 'Fedora Patch16: Install libperl.so to -Dshrpdir value' \ + 'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \ %{nil} %endif @@ -3590,6 +3595,7 @@ sed \ %changelog * Tue Jul 09 2013 Petr Pisar <ppisar@xxxxxxxxxx> - 4:5.18.0-283 - Define SONAME for libperl.so and move the libary into standard path +- Link XS modules to libperl.so on Linux (bug #960048) * Mon Jul 08 2013 Petr Pisar <ppisar@xxxxxxxxxx> - 4:5.18.0-282 - Do not load system Term::ReadLine::Gnu while running tests -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel