1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 12:49:46 +00:00

perl-5.12.2: use of PERLHOSTLIB var fix

PERLHOSTLIB var is used to build target perl. It let perl use the native
perl .so module files at the time of compilation of target perl.

These changes to perl make the PERLHOSTLIB variable also useful for
building perl modules to use native .so perl module.

(From OE-Core rev: f4d51e63c0df777bbcbe9ad160eb3ba41ae74c6e)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Nitin A Kamble
2011-04-20 14:49:41 -07:00
committed by Richard Purdie
parent 4ffd8a2d72
commit 345de20815
57 changed files with 119 additions and 14 deletions
@@ -1,11 +0,0 @@
--- Makefile.SH.orig 2003-07-10 14:59:04.000000000 -0700
+++ Makefile.SH 2003-07-10 15:14:08.000000000 -0700
@@ -494,7 +494,7 @@
case "$useshrplib" in
true)
$spitshell >>Makefile <<'!NO!SUBS!'
- $(LD) -o $@ $(SHRPLDFLAGS) perl$(OBJ_EXT) $(obj) $(libs)
+ $(LD) -o $@ $(SHRPLDFLAGS) perl$(OBJ_EXT) $(obj) $(libs) -soname libperl.so.5
!NO!SUBS!
case "$osname" in
aix)
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [embedded specific]
Correctly identify arch-specific modules in ext/ where the .pm files Correctly identify arch-specific modules in ext/ where the .pm files
are under lib. are under lib.
@@ -1,3 +1,5 @@
Upstream-Status:Pending
Index: perl-5.12.2/Configure Index: perl-5.12.2/Configure
=================================================================== ===================================================================
--- perl-5.12.2.orig/Configure --- perl-5.12.2.orig/Configure
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [embedded specific]
Index: perl-5.12.2/Makefile.SH Index: perl-5.12.2/Makefile.SH
=================================================================== ===================================================================
--- perl-5.12.2.orig/Makefile.SH --- perl-5.12.2.orig/Makefile.SH
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [embedded specific]
Index: perl-5.12.2/Cross/Makefile Index: perl-5.12.2/Cross/Makefile
=================================================================== ===================================================================
--- perl-5.12.2.orig/Cross/Makefile --- perl-5.12.2.orig/Cross/Makefile
@@ -1,3 +1,5 @@
Upstream-Status:Pending
Perl inclues asm/page.h in order to get the definition for getpagesize which Perl inclues asm/page.h in order to get the definition for getpagesize which
has been definied in unistd.h since glibc 2.1. Some recent version of linux has been definied in unistd.h since glibc 2.1. Some recent version of linux
libc headers removed the asm/page.h resulting in failures here for some libc headers removed the asm/page.h resulting in failures here for some
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [embedded specific]
Index: perl-5.10.1/Makefile.SH Index: perl-5.10.1/Makefile.SH
=================================================================== ===================================================================
--- perl-5.10.1.orig/Makefile.SH 2010-02-12 19:06:17.000000000 +0300 --- perl-5.10.1.orig/Makefile.SH 2010-02-12 19:06:17.000000000 +0300
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
From: Niko Tyni <ntyni@debian.org> From: Niko Tyni <ntyni@debian.org>
Description: Downgrade the optimization of sv.c on arm due to a gcc-4.4 bug Description: Downgrade the optimization of sv.c on arm due to a gcc-4.4 bug
Bug-Debian: http://bugs.debian.org/580334 Bug-Debian: http://bugs.debian.org/580334
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Subject: Raise the timeout of ext/threads/shared/t/stress.t to accommodate slower build hosts Subject: Raise the timeout of ext/threads/shared/t/stress.t to accommodate slower build hosts
Bug-Debian: http://bugs.debian.org/501970 Bug-Debian: http://bugs.debian.org/501970
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Subject: Set location of CPAN::Config to /etc/perl as /usr may not be writable. Subject: Set location of CPAN::Config to /etc/perl as /usr may not be writable.
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Subject: Provide a sensible INSTALLDIRS default for modules installed from CPAN. Subject: Provide a sensible INSTALLDIRS default for modules installed from CPAN.
Some modules which are included in core set INSTALLDIRS => 'perl' Some modules which are included in core set INSTALLDIRS => 'perl'
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
From: Niko Tyni <ntyni@debian.org> From: Niko Tyni <ntyni@debian.org>
Subject: Save local versions of CPANPLUS::Config::System into /etc/perl. Subject: Save local versions of CPANPLUS::Config::System into /etc/perl.
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
From: Niko Tyni <ntyni@debian.org> From: Niko Tyni <ntyni@debian.org>
Subject: Configure CPANPLUS to use the site directories by default. Subject: Configure CPANPLUS to use the site directories by default.
Closes: 533707 Closes: 533707
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Subject: Remove overly restrictive DB_File version check. Subject: Remove overly restrictive DB_File version check.
Bug-Debian: http://bugs.debian.org/340047 Bug-Debian: http://bugs.debian.org/340047
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
From: Niko Tyni <ntyni@debian.org> From: Niko Tyni <ntyni@debian.org>
Subject: Point users to Debian packages of deprecated core modules Subject: Point users to Debian packages of deprecated core modules
Bug-Debian: http://bugs.debian.org/580034 Bug-Debian: http://bugs.debian.org/580034
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
From: Niko Tyni <ntyni@debian.org> From: Niko Tyni <ntyni@debian.org>
Subject: Work around an ICE on ia64 Subject: Work around an ICE on ia64
Closes: 548943 Closes: 548943
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
From: Niko Tyni <ntyni@debian.org> From: Niko Tyni <ntyni@debian.org>
Subject: Disable zlib bundling in Compress::Raw::Zlib Subject: Disable zlib bundling in Compress::Raw::Zlib
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Subject: Replace generic man(1) instructions with Debian-specific information. Subject: Replace generic man(1) instructions with Debian-specific information.
Indicate that the user needs to install the perl-doc package. Indicate that the user needs to install the perl-doc package.
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Subject: Tweak enc2xs to follow symlinks and ignore missing @INC directories. Subject: Tweak enc2xs to follow symlinks and ignore missing @INC directories.
Bug-Debian: http://bugs.debian.org/290336 Bug-Debian: http://bugs.debian.org/290336
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Subject: Remove Errno version check due to upgrade problems with long-running processes. Subject: Remove Errno version check due to upgrade problems with long-running processes.
Bug-Debian: http://bugs.debian.org/343351 Bug-Debian: http://bugs.debian.org/343351
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Subject: Various debian-specific ExtUtils changes Subject: Various debian-specific ExtUtils changes
* Respect umask during installation, and set as appropriate for each of * Respect umask during installation, and set as appropriate for each of
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Subject: Postpone LD_LIBRARY_PATH evaluation to the binary targets. Subject: Postpone LD_LIBRARY_PATH evaluation to the binary targets.
Modify the setting of LD_LIBRARY_PATH to append pre-existing values at the Modify the setting of LD_LIBRARY_PATH to append pre-existing values at the
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
From: Niko Tyni <ntyni@debian.org> From: Niko Tyni <ntyni@debian.org>
Subject: Allow for flock returning EAGAIN instead of EWOULDBLOCK on linux/parisc Subject: Allow for flock returning EAGAIN instead of EWOULDBLOCK on linux/parisc
Bug-Debian: http://bugs.debian.org/543731 Bug-Debian: http://bugs.debian.org/543731
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
From: Niko Tyni <ntyni@debian.org> From: Niko Tyni <ntyni@debian.org>
Subject: Fix stack pointer corruption in pp_concat() with 'use encoding' Subject: Fix stack pointer corruption in pp_concat() with 'use encoding'
Bug-Debian: http://bugs.debian.org/596105 Bug-Debian: http://bugs.debian.org/596105
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
From: Niko Tyni <ntyni@debian.org> From: Niko Tyni <ntyni@debian.org>
Subject: Fix CPANPLUS test failures when HOME doesn't exist Subject: Fix CPANPLUS test failures when HOME doesn't exist
Bug: http://rt.cpan.org/Public/Bug/Display.html?id=52988 Bug: http://rt.cpan.org/Public/Bug/Display.html?id=52988
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Author: Robin Barker <rmbarker@cpan.org> Author: Robin Barker <rmbarker@cpan.org>
Subject: h2ph fix for gcc 4.5 Subject: h2ph fix for gcc 4.5
Bug-Debian: http://bugs.debian.org/599933 Bug-Debian: http://bugs.debian.org/599933
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Author: Samuel Thibault <sthibault@debian.org> Author: Samuel Thibault <sthibault@debian.org>
Subject: Make hints/gnu.sh append to $ccflags rather than overriding them Subject: Make hints/gnu.sh append to $ccflags rather than overriding them
Bug-Debian: http://bugs.debian.org/587901 Bug-Debian: http://bugs.debian.org/587901
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
From: Niko Tyni <ntyni@debian.org> From: Niko Tyni <ntyni@debian.org>
Subject: LC_NUMERIC documentation fixes Subject: LC_NUMERIC documentation fixes
Bug-Debian: http://bugs.debian.org/379329 Bug-Debian: http://bugs.debian.org/379329
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
From: Niko Tyni <ntyni@debian.org> From: Niko Tyni <ntyni@debian.org>
Subject: Fix sprintf not to ignore LC_NUMERIC with constants Subject: Fix sprintf not to ignore LC_NUMERIC with constants
Bug-Debian: http://bugs.debian.org/601549 Bug-Debian: http://bugs.debian.org/601549
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Subject: Document the Net::SMTP 'Port' option Subject: Document the Net::SMTP 'Port' option
Bug-Debian: http://bugs.debian.org/100195 Bug-Debian: http://bugs.debian.org/100195
Bug: http://rt.cpan.org/Public/Bug/Display.html?id=36038 Bug: http://rt.cpan.org/Public/Bug/Display.html?id=36038
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Subject: Always use PERLRUNINST when building perl modules. Subject: Always use PERLRUNINST when building perl modules.
Bug-Debian: http://bugs.debian.org/357264 Bug-Debian: http://bugs.debian.org/357264
Bug: http://rt.cpan.org/Public/Bug/Display.html?id=17224 Bug: http://rt.cpan.org/Public/Bug/Display.html?id=17224
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Subject: Debian policy doesn't install .packlist files for core or vendor. Subject: Debian policy doesn't install .packlist files for core or vendor.
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Subject: Remove standard libs from LD_RUN_PATH as per Debian policy. Subject: Remove standard libs from LD_RUN_PATH as per Debian policy.
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Subject: Set location of libnet.cfg to /etc/perl/Net as /usr may not be writable. Subject: Set location of libnet.cfg to /etc/perl/Net as /usr may not be writable.
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Subject: Disable some threads tests on m68k for now due to missing TLS. Subject: Disable some threads tests on m68k for now due to missing TLS.
Closes: #495826, #517938 Closes: #495826, #517938
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Subject: Tweak @INC ordering for Debian Subject: Tweak @INC ordering for Debian
Our order is: Our order is:
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Subject: Adjust Module::Build manual page extensions for the Debian Perl policy Subject: Adjust Module::Build manual page extensions for the Debian Perl policy
Bug-Debian: http://bugs.debian.org/479460 Bug-Debian: http://bugs.debian.org/479460
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
From: Niko Tyni <ntyni@debian.org> From: Niko Tyni <ntyni@debian.org>
Subject: Make perlivp skip include directories in /usr/local Subject: Make perlivp skip include directories in /usr/local
Closes: 510895 Closes: 510895
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Subject: Prune the list of libraries wanted to what we actually need. Subject: Prune the list of libraries wanted to what we actually need.
Bug-Debian: http://bugs.debian.org/128355 Bug-Debian: http://bugs.debian.org/128355
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
From: Niko Tyni <ntyni@debian.org> From: Niko Tyni <ntyni@debian.org>
Subject: Squelch locale warnings in Debian package maintainer scripts Subject: Squelch locale warnings in Debian package maintainer scripts
Bug-Debian: http://bugs.debian.org/508764 Bug-Debian: http://bugs.debian.org/508764
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [embedded specific]
Use the ld flags from the supplied configuration file. For sh we need the Use the ld flags from the supplied configuration file. For sh we need the
flags that specify to build PIC code so that the shared libraries work. flags that specify to build PIC code so that the shared libraries work.
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [embedded specific]
Index: perl-5.12.2/installperl Index: perl-5.12.2/installperl
=================================================================== ===================================================================
--- perl-5.12.2.orig/installperl --- perl-5.12.2.orig/installperl
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [embedded specific]
This removes all the logic that perl uses to locate an appropriate This removes all the logic that perl uses to locate an appropriate
errno.h for the target. Instead we simple create a file that does errno.h for the target. Instead we simple create a file that does
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [debian patch]
Part of 52_debian_extutils_hacks.patch just to exclude the installation of .packlist files Part of 52_debian_extutils_hacks.patch just to exclude the installation of .packlist files
Index: perl-5.12.2/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm Index: perl-5.12.2/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [embedded specific]
Index: perl-5.8.8/lib/ExtUtils/MM_Unix.pm Index: perl-5.8.8/lib/ExtUtils/MM_Unix.pm
=================================================================== ===================================================================
--- perl-5.12.2.orig/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm 2008-10-31 22:01:35.000000000 +0000 --- perl-5.12.2.orig/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm 2008-10-31 22:01:35.000000000 +0000
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [embedded specific]
Fix for compiling with ssp enabled gcc: Fix for compiling with ssp enabled gcc:
See http://bugs.openembedded.net/show_bug.cgi?id=1980 See http://bugs.openembedded.net/show_bug.cgi?id=1980
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [Backport]
Imported from perl git tree by Nitin A Kamble <nitin.a.kamble@intel.com> Imported from perl git tree by Nitin A Kamble <nitin.a.kamble@intel.com>
2011-02-23 2011-02-23
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [Backport]
Imported from perl git tree by Nitin A Kamble <nitin.a.kamble@intel.com> Imported from perl git tree by Nitin A Kamble <nitin.a.kamble@intel.com>
2011-02-23 2011-02-23
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [Backport]
Imported from perl git tree by Nitin A Kamble <nitin.a.kamble@intel.com> Imported from perl git tree by Nitin A Kamble <nitin.a.kamble@intel.com>
2011-02-23 2011-02-23
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [Backport]
commit 43c0c913165d6abe1bc0cb45a784eb1c32c3700b commit 43c0c913165d6abe1bc0cb45a784eb1c32c3700b
Author: Nicholas Clark <nick@ccl4.org> Author: Nicholas Clark <nick@ccl4.org>
Date: Mon Feb 14 09:06:42 2011 +0000 Date: Mon Feb 14 09:06:42 2011 +0000
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [Backport]
Rebased by Nitin A Kamble <nitin.a.kamble@intel.com> on 3/11/2011 Rebased by Nitin A Kamble <nitin.a.kamble@intel.com> on 3/11/2011
commit 5e4c4c91bd52a48de59520d5e9b4e3478e49c613 commit 5e4c4c91bd52a48de59520d5e9b4e3478e49c613
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [Backport]
Rebased by Nitin A Kamble <nitin.a.kamble@intel.com> on 3/11/2011 Rebased by Nitin A Kamble <nitin.a.kamble@intel.com> on 3/11/2011
commit 7353f64c5bca6e7102582a1e0017c850930249c3 commit 7353f64c5bca6e7102582a1e0017c850930249c3
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [native]
This patch is used for perl-native only. It enables the switching of This patch is used for perl-native only. It enables the switching of
configuration files between Config_heavy.pl and configuration files between Config_heavy.pl and
Config_heavy-target.pl by setting the environment variables Config_heavy-target.pl by setting the environment variables
@@ -1,11 +1,15 @@
Upstream-Status:Inappropriate [embedded specific]
Allow the location that .so files are searched for for dynamic Allow the location that .so files are searched for for dynamic
loading to be changed via an environment variable. This is to allow loading to be changed via an environment variable. This is to allow
us to load .so's from the host system while building for the target us to load .so's from the host system while building for the target
system. system.
Update by Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/21
--- perl-5.12.2/dist/XSLoader/XSLoader_pm.PL 2007/04/20 09:03:08 1.1 --- perl-5.12.2/dist/XSLoader/XSLoader_pm.PL 2007/04/20 09:03:08 1.1
+++ perl-5.12.2/dist/XSLoader/XSLoader_pm.PL 2007/04/20 09:03:08 +++ perl-5.12.2/dist/XSLoader/XSLoader_pm.PL 2007/04/20 09:03:08
@@ -65,6 +65,15 @@ @@ -65,6 +65,19 @@
print OUT <<'EOT'; print OUT <<'EOT';
my $modpname = join('/',@modparts); my $modpname = join('/',@modparts);
my $modlibname = (caller())[1]; my $modlibname = (caller())[1];
@@ -15,7 +19,11 @@ system.
+ { + {
+ my $hostlib = $ENV{PERLHOSTLIB}; + my $hostlib = $ENV{PERLHOSTLIB};
+ print STDERR "*** Module name IN: $modlibname\n"; + print STDERR "*** Module name IN: $modlibname\n";
+ $modlibname =~ s#(?<!/)(\.\./)*lib/#$hostlib#g; + ($p1, $p2, $p3, $p4, $p5) = $modlibname =~ m/(^(.*lib\/)?)((perl\/[0-9\.]*\/)?)(.*)$/;
+ print STDERR "*** p1: $p1 p3: $p3 p5: $p5\n";
+ if ( $p1 ne "" ) {
+ $modlibname = $hostlib.$p5;
+ }
+ print STDERR "*** Module name OUT: $modlibname\n"; + print STDERR "*** Module name OUT: $modlibname\n";
+ } + }
my $c = @modparts; my $c = @modparts;
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [embedded specific]
Index: perl-5.8.8/config_h.SH Index: perl-5.8.8/config_h.SH
=================================================================== ===================================================================
--- perl-5.8.8.orig/config_h.SH 2005-11-01 02:13:05.000000000 +0800 --- perl-5.8.8.orig/config_h.SH 2005-11-01 02:13:05.000000000 +0800
@@ -1,3 +1,5 @@
Upstream-Status:Inappropriate [embedded specific]
We need ld in the fake config library, but it's not included by default. So We need ld in the fake config library, but it's not included by default. So
expand the number of items included. While this works it indicates that the expand the number of items included. While this works it indicates that the
rest of the config items are not being picked up and/or are being picked up rest of the config items are not being picked up and/or are being picked up
+1 -1
View File
@@ -8,7 +8,7 @@ PRIORITY = "optional"
# We need gnugrep (for -I) # We need gnugrep (for -I)
DEPENDS = "virtual/db perl-native-${PV} grep-native" DEPENDS = "virtual/db perl-native-${PV} grep-native"
DEPENDS += "gdbm zlib" DEPENDS += "gdbm zlib"
PR = "r3" PR = "r4"
# 5.10.1 has Module::Build built-in # 5.10.1 has Module::Build built-in
PROVIDES += "libmodule-build-perl" PROVIDES += "libmodule-build-perl"