|
|
243a19 |
From b598ba3f2d4b8347c6621cff022b8e2329b79ea5 Mon Sep 17 00:00:00 2001
|
|
|
243a19 |
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
|
243a19 |
Date: Wed, 3 Jul 2013 11:01:02 +0200
|
|
|
243a19 |
Subject: [PATCH] Link XS modules to libperl.so with EU::CBuilder on Linux
|
|
|
243a19 |
MIME-Version: 1.0
|
|
|
243a19 |
Content-Type: text/plain; charset=UTF-8
|
|
|
243a19 |
Content-Transfer-Encoding: 8bit
|
|
|
243a19 |
|
|
|
243a19 |
<https://bugzilla.redhat.com/show_bug.cgi?id=960048>
|
|
|
243a19 |
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327585#50>
|
|
|
243a19 |
|
|
|
243a19 |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
243a19 |
---
|
|
|
243a19 |
MANIFEST | 1 +
|
|
|
243a19 |
.../lib/ExtUtils/CBuilder/Platform/linux.pm | 26 ++++++++++++++++++++++
|
|
|
243a19 |
2 files changed, 27 insertions(+)
|
|
|
243a19 |
create mode 100644 dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
|
|
|
243a19 |
|
|
|
243a19 |
diff --git a/MANIFEST b/MANIFEST
|
|
|
243a19 |
index 397252a..d7c519b 100644
|
|
|
243a19 |
--- a/MANIFEST
|
|
|
243a19 |
+++ b/MANIFEST
|
|
|
243a19 |
@@ -3093,6 +3093,7 @@ dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm CBuilder methods fo
|
|
|
243a19 |
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm CBuilder methods for cygwin
|
|
|
243a19 |
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm CBuilder methods for darwin
|
|
|
243a19 |
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm CBuilder methods for OSF
|
|
|
243a19 |
+dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm CBuilder methods for Linux
|
|
|
243a19 |
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm CBuilder methods for OS/2
|
|
|
243a19 |
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm CBuilder methods for Unix
|
|
|
243a19 |
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm CBuilder methods for VMS
|
|
|
243a19 |
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
|
|
|
243a19 |
new file mode 100644
|
|
|
243a19 |
index 0000000..e3251c4
|
|
|
243a19 |
--- /dev/null
|
|
|
243a19 |
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
|
|
|
243a19 |
@@ -0,0 +1,26 @@
|
|
|
243a19 |
+package ExtUtils::CBuilder::Platform::linux;
|
|
|
243a19 |
+
|
|
|
243a19 |
+use strict;
|
|
|
243a19 |
+use ExtUtils::CBuilder::Platform::Unix;
|
|
|
243a19 |
+use File::Spec;
|
|
|
243a19 |
+
|
|
|
243a19 |
+use vars qw($VERSION @ISA);
|
|
|
243a19 |
+$VERSION = '0.280206';
|
|
|
243a19 |
+@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
|
|
|
243a19 |
+
|
|
|
243a19 |
+sub link {
|
|
|
243a19 |
+ my ($self, %args) = @_;
|
|
|
243a19 |
+ my $cf = $self->{config};
|
|
|
243a19 |
+
|
|
|
243a19 |
+ # Link XS modules to libperl.so explicitly because multiple
|
|
|
243a19 |
+ # dlopen(, RTLD_LOCAL) hides libperl symbols from XS module.
|
|
|
243a19 |
+ local $cf->{lddlflags} = $cf->{lddlflags};
|
|
|
243a19 |
+ if ($ENV{PERL_CORE}) {
|
|
|
243a19 |
+ $cf->{lddlflags} .= ' -L' . $self->perl_inc();
|
|
|
243a19 |
+ }
|
|
|
243a19 |
+ $cf->{lddlflags} .= ' -lperl';
|
|
|
243a19 |
+
|
|
|
243a19 |
+ return $self->SUPER::link(%args);
|
|
|
243a19 |
+}
|
|
|
243a19 |
+
|
|
|
243a19 |
+1;
|
|
|
243a19 |
--
|
|
|
243a19 |
1.8.1.4
|
|
|
243a19 |
|