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