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