summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl-5.12.2/perl-dynloader.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/perl/perl-5.12.2/perl-dynloader.patch')
-rw-r--r--meta/recipes-devtools/perl/perl-5.12.2/perl-dynloader.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl-5.12.2/perl-dynloader.patch b/meta/recipes-devtools/perl/perl-5.12.2/perl-dynloader.patch
new file mode 100644
index 0000000000..061a8236fd
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.12.2/perl-dynloader.patch
@@ -0,0 +1,23 @@
1Allow the location that .so files are searched for for dynamic
2loading to be changed via an environment variable. This is to allow
3us to load .so's from the host system while building for the target
4system.
5
6--- perl-5.12.2/dist/XSLoader/XSLoader_pm.PL 2007/04/20 09:03:08 1.1
7+++ perl-5.12.2/dist/XSLoader/XSLoader_pm.PL 2007/04/20 09:03:08
8@@ -65,6 +65,15 @@
9 print OUT <<'EOT';
10 my $modpname = join('/',@modparts);
11 my $modlibname = (caller())[1];
12+ # OE: Allow env to form dynamic loader to look in a different place
13+ # This is so it finds the host .so files, not the targets
14+ if (defined $ENV{PERLHOSTLIB})
15+ {
16+ my $hostlib = $ENV{PERLHOSTLIB};
17+ print STDERR "*** Module name IN: $modlibname\n";
18+ $modlibname =~ s#(?<!/)(\.\./)*lib/#$hostlib#g;
19+ print STDERR "*** Module name OUT: $modlibname\n";
20+ }
21 my $c = @modparts;
22 $modlibname =~ s,[\\/][^\\/]+$,, while $c--; # Q&D basename
23 my $file = "$modlibname/auto/$modpname/$modfname.$dl_dlext";