summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2021-10-20 15:19:32 +0800
committerJia Zhang <10241344+jiazhang0@users.noreply.github.com>2021-10-21 15:57:54 +0800
commit4caca5b780dbbdeaeffbc1054a6e99c5f596026d (patch)
tree824246c552a3b07e6ff6dfebec6cbfd74b8861a2
parentb308dc89ac2626d8150d59d76cdaf5c710fb510f (diff)
downloadmeta-secure-core-4caca5b780dbbdeaeffbc1054a6e99c5f596026d.tar.gz
tpm2-tools: fix build with openssl 3.0
Backport a patch to disable '-Werror' to fix build error until upstream addresses openssl 3.0 compatibility issue. Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
-rw-r--r--meta-tpm2/recipes-tpm/tpm2-tools/files/0001-build-only-use-Werror-for-non-release-builds.patch34
-rw-r--r--meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_4.1.3.bb1
2 files changed, 35 insertions, 0 deletions
diff --git a/meta-tpm2/recipes-tpm/tpm2-tools/files/0001-build-only-use-Werror-for-non-release-builds.patch b/meta-tpm2/recipes-tpm/tpm2-tools/files/0001-build-only-use-Werror-for-non-release-builds.patch
new file mode 100644
index 0000000..9edad0c
--- /dev/null
+++ b/meta-tpm2/recipes-tpm/tpm2-tools/files/0001-build-only-use-Werror-for-non-release-builds.patch
@@ -0,0 +1,34 @@
1From 0d7cb21f01e390ee42d5238d297e48b39b23205a Mon Sep 17 00:00:00 2001
2From: Jonas Witschel <diabonas@gmx.de>
3Date: Fri, 14 May 2021 12:03:24 +0200
4Subject: [PATCH] build: only use -Werror for non-release builds
5
6While we want to catch any compiler warnings during development, a release
7build should never fail due to e.g. stricter static checks introduced by new
8compiler versions.
9
10Upstream-Status: Backport
11[https://github.com/tpm2-software/tpm2-tools/commit/a691a7de76a5d57af90a868d68c5f48e4e47015b]
12
13Signed-off-by: Jonas Witschel <diabonas@gmx.de>
14Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
15---
16 configure.ac | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/configure.ac b/configure.ac
20index fd7fa55..7ad2806 100644
21--- a/configure.ac
22+++ b/configure.ac
23@@ -178,7 +178,7 @@ AS_IF([test x"$enable_hardening" != x"no"], [
24
25 add_hardened_c_flag([-Wall])
26 add_hardened_c_flag([-Wextra])
27- add_hardened_c_flag([-Werror])
28+ AS_IF([test "x$ax_is_release" = "xno"], [add_hardened_c_flag([-Werror])])
29
30 add_hardened_c_flag([-Wformat])
31 add_hardened_c_flag([-Wformat-security])
32--
332.17.1
34
diff --git a/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_4.1.3.bb b/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_4.1.3.bb
index 1df2d40..496f494 100644
--- a/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_4.1.3.bb
+++ b/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_4.1.3.bb
@@ -9,6 +9,7 @@ DEPENDS = "tpm2-abrmd tpm2-tss openssl curl autoconf-archive"
9SRC_URI = "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz \ 9SRC_URI = "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz \
10 file://0001-tests-switch-to-python3.patch \ 10 file://0001-tests-switch-to-python3.patch \
11 file://CVE-2021-3565.patch \ 11 file://CVE-2021-3565.patch \
12 file://0001-build-only-use-Werror-for-non-release-builds.patch \
12 " 13 "
13 14
14SRC_URI[md5sum] = "48e0f58232b6a86fe4d007acf12af283" 15SRC_URI[md5sum] = "48e0f58232b6a86fe4d007acf12af283"