Blame SOURCES/perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch

276c98
From b598ba3f2d4b8347c6621cff022b8e2329b79ea5 Mon Sep 17 00:00:00 2001
276c98
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
276c98
Date: Wed, 3 Jul 2013 11:01:02 +0200
276c98
Subject: [PATCH] Link XS modules to libperl.so with EU::CBuilder on Linux
276c98
MIME-Version: 1.0
276c98
Content-Type: text/plain; charset=UTF-8
276c98
Content-Transfer-Encoding: 8bit
276c98
276c98
<https://bugzilla.redhat.com/show_bug.cgi?id=960048>
276c98
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327585#50>
276c98
276c98
Signed-off-by: Petr Písař <ppisar@redhat.com>
276c98
---
276c98
 MANIFEST                                           |  1 +
276c98
 .../lib/ExtUtils/CBuilder/Platform/linux.pm        | 26 ++++++++++++++++++++++
276c98
 2 files changed, 27 insertions(+)
276c98
 create mode 100644 dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
276c98
276c98
diff --git a/MANIFEST b/MANIFEST
276c98
index 397252a..d7c519b 100644
276c98
--- a/MANIFEST
276c98
+++ b/MANIFEST
276c98
@@ -3093,6 +3093,7 @@ dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm	CBuilder methods fo
276c98
 dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm	CBuilder methods for cygwin
276c98
 dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm	CBuilder methods for darwin
276c98
 dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm	CBuilder methods for OSF
276c98
+dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm	CBuilder methods for Linux
276c98
 dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm	CBuilder methods for OS/2
276c98
 dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm	CBuilder methods for Unix
276c98
 dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm	CBuilder methods for VMS
276c98
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
276c98
new file mode 100644
276c98
index 0000000..e3251c4
276c98
--- /dev/null
276c98
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
276c98
@@ -0,0 +1,26 @@
276c98
+package ExtUtils::CBuilder::Platform::linux;
276c98
+
276c98
+use strict;
276c98
+use ExtUtils::CBuilder::Platform::Unix;
276c98
+use File::Spec;
276c98
+
276c98
+use vars qw($VERSION @ISA);
276c98
+$VERSION = '0.280206';
276c98
+@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
276c98
+
276c98
+sub link {
276c98
+  my ($self, %args) = @_;
276c98
+  my $cf = $self->{config};
276c98
+
276c98
+  # Link XS modules to libperl.so explicitly because multiple
276c98
+  # dlopen(, RTLD_LOCAL) hides libperl symbols from XS module.
276c98
+  local $cf->{lddlflags} = $cf->{lddlflags};
276c98
+  if ($ENV{PERL_CORE}) {
276c98
+    $cf->{lddlflags} .= ' -L' . $self->perl_inc();
276c98
+  }
276c98
+  $cf->{lddlflags} .= ' -lperl';
276c98
+
276c98
+  return $self->SUPER::link(%args);
276c98
+}
276c98
+
276c98
+1;
276c98
-- 
276c98
1.8.1.4
276c98