diff options
Diffstat (limited to 'meta/packages/perl/perl-5.8.8/perl-dynloader.patch')
-rw-r--r-- | meta/packages/perl/perl-5.8.8/perl-dynloader.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/meta/packages/perl/perl-5.8.8/perl-dynloader.patch b/meta/packages/perl/perl-5.8.8/perl-dynloader.patch new file mode 100644 index 0000000000..e2dc774d5e --- /dev/null +++ b/meta/packages/perl/perl-5.8.8/perl-dynloader.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Allow the location that .so files are searched for for dynamic | ||
2 | loading to be changed via an environment variable. This is to allow | ||
3 | us to load .so's from the host system while building for the target | ||
4 | system. | ||
5 | |||
6 | --- perl-5.8.8/ext/DynaLoader/XSLoader_pm.PL 2007/04/20 09:03:08 1.1 | ||
7 | +++ perl-5.8.8/ext/DynaLoader/XSLoader_pm.PL 2007/04/20 09:41:28 | ||
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"; | ||