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