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

276c98
From fc1f8ac36c34c35bad84fb7b99a26ab83c9ba075 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 12:59:09 +0200
276c98
Subject: [PATCH] Link XS modules to libperl.so with EU::MM 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
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 8 +++++++-
276c98
 1 file changed, 7 insertions(+), 1 deletion(-)
276c98
276c98
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
276c98
index a8b172f..a3fbce2 100644
276c98
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
276c98
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
276c98
@@ -31,6 +31,7 @@ BEGIN {
276c98
     $Is{IRIX}    = $^O eq 'irix';
276c98
     $Is{NetBSD}  = $^O eq 'netbsd';
276c98
     $Is{Interix} = $^O eq 'interix';
276c98
+    $Is{Linux}   = $^O eq 'linux';
276c98
     $Is{SunOS4}  = $^O eq 'sunos';
276c98
     $Is{Solaris} = $^O eq 'solaris';
276c98
     $Is{SunOS}   = $Is{SunOS4} || $Is{Solaris};
276c98
@@ -932,7 +933,7 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).
276c98
 
276c98
     my $libs = '$(LDLOADLIBS)';
276c98
 
276c98
-    if (($Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
276c98
+    if (($Is{Linux} || $Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
276c98
 	# Use nothing on static perl platforms, and to the flags needed
276c98
 	# to link against the shared libperl library on shared perl
276c98
 	# platforms.  We peek at lddlflags to see if we need -Wl,-R
276c98
@@ -941,6 +942,11 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).
276c98
             # The Android linker will not recognize symbols from
276c98
             # libperl unless the module explicitly depends on it.
276c98
             $libs .= ' "-L$(PERL_INC)" -lperl';
276c98
+        } else {
276c98
+            if ($ENV{PERL_CORE}) {
276c98
+                $libs .= ' "-L$(PERL_INC)"';
276c98
+            }
276c98
+            $libs .= ' -lperl';
276c98
         }
276c98
     }
276c98
 
276c98
-- 
276c98
1.8.1.4
276c98