summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMingli Yu <Mingli.Yu@windriver.com>2019-07-24 09:47:27 +0800
committerJia Zhang <zhang.jia@linux.alibaba.com>2019-07-24 12:07:13 +0800
commita32ad2f61d4c63fc5bfef08f25d5e28a5ecd1d7a (patch)
treebfe2bcae8e4e8a5f647838da2437f636fcaecaad
parent075c5e687eb9a8bb4564891a3bc83879c4365d4a (diff)
downloadmeta-secure-core-a32ad2f61d4c63fc5bfef08f25d5e28a5ecd1d7a.tar.gz
tpm2-abrmd: fix do_compile error
After commit [5ef547b autoconf-archive: update to 2019.01.06] applied in oe-core, there comes below error when build tpm2-abrmd: | NOTE: make -j 48 | Makefile:4381: *** missing separator. Stop. So backport a patch from tpm2-abrmd upstream to fix this failure. Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
-rw-r--r--meta-tpm2/recipes-tpm/tpm2-abrmd/files/0001-build-update-for-ax_code_coverage.m4-version-2019.01.patch69
-rw-r--r--meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_2.0.3.bb1
2 files changed, 70 insertions, 0 deletions
diff --git a/meta-tpm2/recipes-tpm/tpm2-abrmd/files/0001-build-update-for-ax_code_coverage.m4-version-2019.01.patch b/meta-tpm2/recipes-tpm/tpm2-abrmd/files/0001-build-update-for-ax_code_coverage.m4-version-2019.01.patch
new file mode 100644
index 0000000..65a09b4
--- /dev/null
+++ b/meta-tpm2/recipes-tpm/tpm2-abrmd/files/0001-build-update-for-ax_code_coverage.m4-version-2019.01.patch
@@ -0,0 +1,69 @@
1From 3cacba40114f26650c681b067ff0495f4a0dd186 Mon Sep 17 00:00:00 2001
2From: Jonas Witschel <diabonas@gmx.de>
3Date: Fri, 25 Jan 2019 16:52:21 +0100
4Subject: [PATCH] build: update for ax_code_coverage.m4 version 2019.01.06
5
6 @CODE_COVERAGE_RULES@ doesn't exist any more and needs to be replaced.
7 Also includes a compatibility wrapper for older versions of the file.
8
9There is a bug in the new version of ax_code_coverage.m4
10(cf. https://github.com/autoconf-archive/autoconf-archive/pull/182):
11AM_DISTCHECK_CONFIGURE_FLAGS is recursively defined, which causes
12"make distcheck" to fail in combination with --enable-code-coverage.
13This is fixed by overwriting the faulty definition.
14
15Upstream-Status: Backport [https://github.com/tpm2-software/tpm2-abrmd/commit/3cacba40114f26650c681b067ff0495f4a0dd186]
16
17Signed-off-by: Jonas Witschel <diabonas@gmx.de>
18Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
19---
20 Makefile.am | 15 +++++++++++++++
21 configure.ac | 5 +++++
22 2 files changed, 17 insertions(+)
23
24diff --git a/Makefile.am b/Makefile.am
25index 68c5359..eaeca94 100644
26--- a/Makefile.am
27+++ b/Makefile.am
28@@ -166,7 +166,22 @@ dbusservicedir = $(datadir)/dbus-1/system-services
29 dbusservice_DATA = dist/com.intel.tss2.Tabrmd.service
30 endif # HAVE_SYSTEMD
31
32+# ax_code_coverage
33+if AUTOCONF_CODE_COVERAGE_2019_01_06
34+include $(top_srcdir)/aminclude_static.am
35+clean-local: code-coverage-clean
36+distclean-local: code-coverage-dist-clean
37+
38+# workaround for a bug in Autoconf Archive 2019.01.06
39+# (https://github.com/autoconf-archive/autoconf-archive/pull/182)
40+if CODE_COVERAGE_ENABLED
41+AM_DISTCHECK_CONFIGURE_FLAGS := $(AM_DISTCHECK_CONFIGURE_FLAGS) --disable-code-coverage
42+endif # CODE_COVERAGE_ENABLED
43+
44+else # AUTOCONF_CODE_COVERAGE_2019_01_06
45 @CODE_COVERAGE_RULES@
46+endif # AUTOCONF_CODE_COVERAGE_2019_01_06
47+
48 @VALGRIND_CHECK_RULES@
49 VALGRIND_G_DEBUG = fatal-criticals,gc-friendly
50 VALGRIND_memcheck_FLAGS = --leak-check=full --show-leak-kinds=definite,indirect --track-origins=yes --error-exitcode=1
51diff --git a/configure.ac b/configure.ac
52index 504db32..6f35fb5 100644
53--- a/configure.ac
54+++ b/configure.ac
55@@ -45,6 +45,11 @@ AS_IF([test ! -x "$(which $GDBUS_CODEGEN)"],
56 [AC_MSG_ERROR([*** gdbus-codegen is required to build tpm2-abrmd])])
57
58 AX_CODE_COVERAGE
59+m4_ifdef([_AX_CODE_COVERAGE_RULES],
60+ [AM_CONDITIONAL(AUTOCONF_CODE_COVERAGE_2019_01_06, [true])],
61+ [AM_CONDITIONAL(AUTOCONF_CODE_COVERAGE_2019_01_06, [false])])
62+AX_ADD_AM_MACRO_STATIC([])
63+
64 # disable helgrind and drd, they hate GAsyncQueue
65 AX_VALGRIND_DFLT([sgcheck], [off])
66 AX_VALGRIND_DFLT([helgrind], [off])
67--
682.7.4
69
diff --git a/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_2.0.3.bb b/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_2.0.3.bb
index be14260..ab07063 100644
--- a/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_2.0.3.bb
+++ b/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_2.0.3.bb
@@ -2,6 +2,7 @@ include ${BPN}.inc
2 2
3SRC_URI += " \ 3SRC_URI += " \
4 https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz \ 4 https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz \
5 file://0001-build-update-for-ax_code_coverage.m4-version-2019.01.patch \
5 file://tpm2-abrmd.default \ 6 file://tpm2-abrmd.default \
6" 7"
7SRC_URI[md5sum] = "a71faf008de2e444265b0d1d889cab2e" 8SRC_URI[md5sum] = "a71faf008de2e444265b0d1d889cab2e"