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