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