summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMingli Yu <mingli.yu@windriver.com>2019-04-25 19:10:30 -0700
committerKhem Raj <raj.khem@gmail.com>2019-04-29 10:13:56 -0700
commita57a63f0c9882b93e5ac90525ed14a6f08460a2b (patch)
treea61b0694d29c7683a8bcfa97af149eb561257eb1
parent7392f986b69d80a66322149d024f24347a273076 (diff)
downloadmeta-openembedded-a57a63f0c9882b93e5ac90525ed14a6f08460a2b.tar.gz
libdev-checklib-perl: add new recipe
It provides the perl module (Devel::CheckLib) which may needed by other package which uses it to check libs. Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-devtools/perl/libdev-checklib-perl/0001-CheckLib.pm-don-t-execute-the-binary.patch46
-rw-r--r--meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.13.bb21
2 files changed, 67 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/perl/libdev-checklib-perl/0001-CheckLib.pm-don-t-execute-the-binary.patch b/meta-oe/recipes-devtools/perl/libdev-checklib-perl/0001-CheckLib.pm-don-t-execute-the-binary.patch
new file mode 100644
index 000000000..78a7e63b9
--- /dev/null
+++ b/meta-oe/recipes-devtools/perl/libdev-checklib-perl/0001-CheckLib.pm-don-t-execute-the-binary.patch
@@ -0,0 +1,46 @@
1From d111fd85b25466f7829ccee34493aa0e3b551308 Mon Sep 17 00:00:00 2001
2From: Mingli Yu <mingli.yu@windriver.com>
3Date: Tue, 23 Apr 2019 19:13:19 -0700
4Subject: [PATCH] CheckLib.pm: don't execute the binary
5
6Don't execute the binary in build env as the
7binary which is generated in cross compile env
8may fail when executed in build env.
9
10And it's enough to verify the libs via successully
11generate the binary which links the libs as below.
12 $ /yocto/builds/upgrade1/tmp/work/core2-64-poky-linux/libdbd-mysql-perl/4.050-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc \
13 -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security \
14 -Werror=format-security --sysroot=/yocto/builds/upgrade1/tmp/work/core2-64-poky-linux/libdbd-mysql-perl/4.050-r0/recipe-sysroot \
15 -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/yocto/builds/upgrade1/tmp/work/core2-64-poky-linux/perl/5.28.1-r1=/usr/src/debug/perl/5.28.1-r1 \
16 -fdebug-prefix-map=/yocto/builds/upgrade1/tmp/work/core2-64-poky-linux/perl/5.28.1-r1=/usr/src/debug/perl/5.28.1-r1 \
17 -fdebug-prefix-map=/yocto/builds/upgrade1/tmp/work/core2-64-poky-linux/libdbd-mysql-perl/4.050-r0/recipe-sysroot= -fdebug-prefix-map=/yocto/builds/upgrade1/tmp/work/core2-64-poky-linux/libdbd-mysql-perl/4.050-r0/recipe-sysroot-native= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 assertlibEhx19yuY.c -L/yocto/builds/upgrade1/tmp/work/core2-64-poky-linux/libdbd-mysql-perl/4.050-r0/recipe-sysroot/usr/lib -lcrypto -fstack-protector-strong -o assertlibCOw_eujb
18
19Execute the binary in cross compile env as below
20and use the return status to determine the lib's
21checking status is not appropriate in cross compile env.
22 $ /yocto/builds/upgrade1/tmp/work/core2-64-poky-linux/libdbd-mysql-perl/4.050-r0/git/assertlibCOw_eujb
23
24Upstream-Status: Inappropriate[oe specific]
25
26Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
27---
28 lib/Devel/CheckLib.pm | 2 +-
29 1 file changed, 1 insertion(+), 1 deletion(-)
30
31diff --git a/lib/Devel/CheckLib.pm b/lib/Devel/CheckLib.pm
32index e45cfb4..d228bb5 100644
33--- a/lib/Devel/CheckLib.pm
34+++ b/lib/Devel/CheckLib.pm
35@@ -424,7 +424,7 @@ sub assert_lib {
36 my $absexefile = File::Spec->rel2abs($exefile);
37 $absexefile = '"'.$absexefile.'"' if $absexefile =~ m/\s/;
38 if (!$not_execute && system($absexefile) != 0) {
39- push @wrongresult, $lib;
40+ print "Checking the lib $lib\n";
41 }
42 else {
43 if ($analyze_binary) {
44--
452.17.1
46
diff --git a/meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.13.bb b/meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.13.bb
new file mode 100644
index 000000000..f5bdb2087
--- /dev/null
+++ b/meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.13.bb
@@ -0,0 +1,21 @@
1SUMMARY = "A Perl module that checks whether a particular C library and its headers are available"
2DESCRIPTION = "This module provides a way of checking whether a particular library \
3and its headers are available, by attempting to compile a simple program and \
4link against it."
5HOMEPAGE = "https://metacpan.org/pod/Devel::CheckLib"
6SECTION = "libs"
7LICENSE = "Artistic-1.0 | GPL-1.0+"
8
9LIC_FILES_CHKSUM = "file://README;md5=7911cdbb572d25c5f2e2ea17f669efc2"
10
11SRC_URI = "https://cpan.metacpan.org/modules/by-module/Devel/Devel-CheckLib-${PV}.tar.gz \
12 file://0001-CheckLib.pm-don-t-execute-the-binary.patch \
13"
14SRC_URI[md5sum] = "930216c5abc0f016df8a7539d48c891a"
15SRC_URI[sha256sum] = "24adfd908705dfac4bb320711763f37126b75cf54b3566c2c27c7cdef9c429a8"
16
17S = "${WORKDIR}/Devel-CheckLib-${PV}"
18
19inherit cpan
20
21BBCLASSEXTEND="native"