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