summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-11-08 20:25:25 -0800
committerKhem Raj <raj.khem@gmail.com>2020-11-09 13:41:02 -0800
commit1b825a6e58898ce18f8f73b0caf4e54c1407b9e1 (patch)
tree6eec7fbdc27399bf3f6c7a7e868742dfb3e8b611
parent294e945309e5cabfbb60c80f95063e3be9b46bc2 (diff)
downloadmeta-openembedded-1b825a6e58898ce18f8f73b0caf4e54c1407b9e1.tar.gz
cmocka: Fix buils with LTO
Update to latest on master Drop uintptr_t patch, its fixed upstream differently Package up the new library libproc_uptime.so needed by examples Add it to INSANE_SKIP for examples Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb10
-rw-r--r--meta-oe/recipes-test/cmocka/files/cmocka-uintptr_t.patch53
2 files changed, 7 insertions, 56 deletions
diff --git a/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb b/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
index 5aee5ef931..e4afa43e97 100644
--- a/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
+++ b/meta-oe/recipes-test/cmocka/cmocka_1.1.5.bb
@@ -6,17 +6,19 @@ HOMEPAGE = "https://cmocka.org/"
6LICENSE = "Apache-2.0" 6LICENSE = "Apache-2.0"
7LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" 7LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
8 8
9SRCREV = "56eb3a183fc222120f86d0c54fd033992c30135e" 9SRCREV = "a4fc3dd7705c277e3a57432895e9852ea105dac9"
10PV .= "+git${SRCPV}"
10SRC_URI = "git://git.cryptomilk.org/projects/cmocka.git \ 11SRC_URI = "git://git.cryptomilk.org/projects/cmocka.git \
11 file://run-ptest \ 12 file://run-ptest \
12 file://cmocka-uintptr_t.patch \
13 " 13 "
14 14
15S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"
16 16
17inherit cmake ptest 17inherit cmake ptest
18 18
19EXTRA_OECMAKE = "${@bb.utils.contains('PTEST_ENABLED', '1', '-DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=ON', '', d)}" 19EXTRA_OECMAKE += "${@bb.utils.contains('PTEST_ENABLED', '1', '-DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=ON', '', d)}"
20# Use -Wl,wrap linker flag, which does not work with LTO
21LTO = ""
20 22
21do_install_append () { 23do_install_append () {
22 install -d ${D}${datadir}/${BPN}/example 24 install -d ${D}${datadir}/${BPN}/example
@@ -27,6 +29,7 @@ do_install_append () {
27 install -m 0755 ${B}/example/mock/chef_wrap/waiter_test_wrap ${D}/${datadir}/${BPN}/example/mock/chef_wrap 29 install -m 0755 ${B}/example/mock/chef_wrap/waiter_test_wrap ${D}/${datadir}/${BPN}/example/mock/chef_wrap
28 install -m 0755 ${B}/example/mock/uptime/uptime ${D}/${datadir}/${BPN}/example/mock/uptime 30 install -m 0755 ${B}/example/mock/uptime/uptime ${D}/${datadir}/${BPN}/example/mock/uptime
29 install -m 0755 ${B}/example/mock/uptime/test_uptime ${D}/${datadir}/${BPN}/example/mock/uptime 31 install -m 0755 ${B}/example/mock/uptime/test_uptime ${D}/${datadir}/${BPN}/example/mock/uptime
32 install -m 0644 ${B}/example/mock/uptime/libproc_uptime.so ${D}/${datadir}/${BPN}/example/mock/libproc_uptime.so
30} 33}
31 34
32do_install_ptest () { 35do_install_ptest () {
@@ -37,3 +40,4 @@ do_install_ptest () {
37PACKAGE_BEFORE_PN += "${PN}-examples" 40PACKAGE_BEFORE_PN += "${PN}-examples"
38 41
39FILES_${PN}-examples = "${datadir}/${BPN}/example" 42FILES_${PN}-examples = "${datadir}/${BPN}/example"
43INSANE_SKIP_${PN}-examples = "libdir"
diff --git a/meta-oe/recipes-test/cmocka/files/cmocka-uintptr_t.patch b/meta-oe/recipes-test/cmocka/files/cmocka-uintptr_t.patch
deleted file mode 100644
index 8d3b73b631..0000000000
--- a/meta-oe/recipes-test/cmocka/files/cmocka-uintptr_t.patch
+++ /dev/null
@@ -1,53 +0,0 @@
1From 5bd7b5d04435bd593349825973ce32290f5f604d Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Wed, 25 Jul 2018 09:55:25 +0800
4Subject: [PATCH] samba: cmocka.h: fix musl libc conflicting types error
5
6Fix build on qemumips64(el)
7
8taken from:
9[PATCH] libldb: fix musl libc conflicting types error
10
11/third_party/cmocka/cmocka.h:126:28: error: conflicting types for 'uintptr_t'
12 typedef unsigned int uintptr_t;
13 ^~~~~~~~~
14use __DEFINED_uintptr_t in alltypes.h to check if uintptr already defined
15
16Upstream-Status: Pending
17
18Signed-off-by: Changqing Li <changqing.li@windriver.com>
19Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
20
21Taken from [PATCH] samba: cmocka.h: fix musl libc conflicting types error
22https://git.openembedded.org/meta-openembedded/commit/meta-networking/recipes-connectivity/samba?id=b758150d30a5fbdc47c465d0e9dca3a7e6d71f3c
23
24Signed-off-by: Armin Kuster <akuster808@gmail.com>
25
26This fix is not in cmocka, so pending pending??
27
28
29Index: git/include/cmocka.h
30===================================================================
31--- git.orig/include/cmocka.h
32+++ git/include/cmocka.h
33@@ -116,7 +116,7 @@ typedef uintmax_t LargestIntegralType;
34 ((LargestIntegralType)(value))
35
36 /* Smallest integral type capable of holding a pointer. */
37-#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED)
38+#if !defined(__DEFINED_uintptr_t)
39 # if defined(_WIN32)
40 /* WIN32 is an ILP32 platform */
41 typedef unsigned int uintptr_t;
42@@ -140,9 +140,8 @@ typedef uintmax_t LargestIntegralType;
43 # endif /* __WORDSIZE */
44 # endif /* _WIN32 */
45
46-# define _UINTPTR_T
47-# define _UINTPTR_T_DEFINED
48-#endif /* !defined(_UINTPTR_T) || !defined(_UINTPTR_T_DEFINED) */
49+# define __DEFINED_uintptr_t
50+#endif /* !defined(__DEFINED_uintptr_t) */
51
52 /* Perform an unsigned cast to uintptr_t. */
53 #define cast_to_pointer_integral_type(value) \