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