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

243a19
From fc1f8ac36c34c35bad84fb7b99a26ab83c9ba075 Mon Sep 17 00:00:00 2001
243a19
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
243a19
Date: Wed, 3 Jul 2013 12:59:09 +0200
243a19
Subject: [PATCH] Link XS modules to libperl.so with EU::MM on Linux
243a19
MIME-Version: 1.0
243a19
Content-Type: text/plain; charset=UTF-8
243a19
Content-Transfer-Encoding: 8bit
243a19
243a19
<https://bugzilla.redhat.com/show_bug.cgi?id=960048>
243a19
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327585#50>
243a19
243a19
Signed-off-by: Petr Písař <ppisar@redhat.com>
243a19
---
243a19
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 8 +++++++-
243a19
 1 file changed, 7 insertions(+), 1 deletion(-)
243a19
243a19
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
243a19
index a8b172f..a3fbce2 100644
243a19
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
243a19
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
243a19
@@ -31,6 +31,7 @@ BEGIN {
243a19
     $Is{IRIX}    = $^O eq 'irix';
243a19
     $Is{NetBSD}  = $^O eq 'netbsd';
243a19
     $Is{Interix} = $^O eq 'interix';
243a19
+    $Is{Linux}   = $^O eq 'linux';
243a19
     $Is{SunOS4}  = $^O eq 'sunos';
243a19
     $Is{Solaris} = $^O eq 'solaris';
243a19
     $Is{SunOS}   = $Is{SunOS4} || $Is{Solaris};
243a19
@@ -932,7 +933,7 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).
243a19
     push(@m,"	\$(RM_F) \$\@\n");
243a19
 
243a19
     my $libs = '$(LDLOADLIBS)';
243a19
-    if (($Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
243a19
+    if (($Is{Linux} || $Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
243a19
         # Use nothing on static perl platforms, and to the flags needed
243a19
         # to link against the shared libperl library on shared perl
243a19
         # platforms.  We peek at lddlflags to see if we need -Wl,-R
243a19
@@ -941,6 +942,11 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).
243a19
             # The Android linker will not recognize symbols from
243a19
             # libperl unless the module explicitly depends on it.
243a19
             $libs .= ' "-L$(PERL_INC)" -lperl';
243a19
+        } else {
243a19
+            if ($ENV{PERL_CORE}) {
243a19
+                $libs .= ' "-L$(PERL_INC)"';
243a19
+            }
243a19
+            $libs .= ' -lperl';
243a19
         }
243a19
     }
243a19
 
243a19
-- 
243a19
1.8.1.4
243a19