diff options
Diffstat (limited to 'meta/recipes-devtools/perl/files/perl-dynloader.patch')
-rw-r--r-- | meta/recipes-devtools/perl/files/perl-dynloader.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/files/perl-dynloader.patch b/meta/recipes-devtools/perl/files/perl-dynloader.patch new file mode 100644 index 0000000000..6bb832a426 --- /dev/null +++ b/meta/recipes-devtools/perl/files/perl-dynloader.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | Upstream-Status:Inappropriate [embedded specific] | ||
2 | |||
3 | Allow the location that .so files are searched for for dynamic | ||
4 | loading to be changed via an environment variable. This is to allow | ||
5 | us to load .so's from the host system while building for the target | ||
6 | system. | ||
7 | |||
8 | Update by Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/21 | ||
9 | |||
10 | Index: 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 { | ||