summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl-sanity/files/perl-dynloader.patch
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2018-12-02 12:43:30 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-11 10:39:09 +0000
commitead379657b85dad0104661b9162b0b847b9391fd (patch)
tree8b6935d9d7c0a72dabd46637ce554042a654363d /meta/recipes-devtools/perl-sanity/files/perl-dynloader.patch
parentd94ac527b3a2bf1a8330b676513062bf699fbbe3 (diff)
downloadpoky-ead379657b85dad0104661b9162b0b847b9391fd.tar.gz
perl: add a version that builds the recipe using perl-cross, and update to 5.28.1
perl-cross is a build system overlay from buildroot project that aims to bring a bit of sanity to cross-building perl. The advantage of using that is that we can drop a lot of custom patches (that no one really understands), and simplify the perl recipe as well. Also the build time goes down from several minutes to about 30 seconds. The whole thing becomes maintainable again, in my opinion. When rewriting the recipe I had two goals in mind: 1. Stay with upstream defaults as much as possible 2. Add custom patches only when their necessity was proven through testing. http://arsv.github.io/perl-cross/ (From OE-Core rev: 52f2828314f851263ca3a6beb41ec936fab4d3ab) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/perl-sanity/files/perl-dynloader.patch')
-rw-r--r--meta/recipes-devtools/perl-sanity/files/perl-dynloader.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl-sanity/files/perl-dynloader.patch b/meta/recipes-devtools/perl-sanity/files/perl-dynloader.patch
new file mode 100644
index 0000000000..6bb832a426
--- /dev/null
+++ b/meta/recipes-devtools/perl-sanity/files/perl-dynloader.patch
@@ -0,0 +1,38 @@
1Upstream-Status:Inappropriate [embedded specific]
2
3Allow the location that .so files are searched for for dynamic
4loading to be changed via an environment variable. This is to allow
5us to load .so's from the host system while building for the target
6system.
7
8Update by Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/21
9
10Index: perl-5.24.1/dist/XSLoader/XSLoader_pm.PL
11===================================================================
12--- perl-5.24.1.orig/dist/XSLoader/XSLoader_pm.PL
13+++ perl-5.24.1/dist/XSLoader/XSLoader_pm.PL
14@@ -52,6 +52,24 @@ sub load {
15 my ($caller, $modlibname) = caller();
16 my $module = $caller;
17
18+ # OE: Allow env to form dynamic loader to look in a different place
19+ # This is so it finds the host .so files, not the targets
20+ if (defined $ENV{PERLHOSTLIB})
21+ {
22+ my $hostlib = $ENV{PERLHOSTLIB};
23+ my $hostarchlib = $ENV{PERLHOSTARCHLIB};
24+ print STDERR "*** Module name IN: $modlibname\n";
25+ ($p1, $p2, $p3, $p4, $p5, $p6, $p7) = $modlibname =~ m/(^(.*lib\w*\/)?)((perl5\/[0-9\.]*\/)?)(([^\/]*)\/)?(.*)$/;
26+ print STDERR "*** p1: $p1 p3: $p3 p5: $p5 p7: $p7\n";
27+ if ( $p1 ne "" ) {
28+ $modlibname = $hostlib.$p7;
29+ }
30+ if ( $p6 ne "" ) {
31+ $modlibname = $hostarchlib.$p7;
32+ }
33+ print STDERR "*** Module name OUT: $modlibname\n";
34+ }
35+
36 if (@_) {
37 $module = $_[0];
38 } else {