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