diff options
-rw-r--r-- | meta-tpm2/recipes-tpm/tpm2-tools/files/0001-build-only-use-Werror-for-non-release-builds.patch | 34 | ||||
-rw-r--r-- | meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_4.1.3.bb | 1 |
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 @@ | |||
1 | From 0d7cb21f01e390ee42d5238d297e48b39b23205a Mon Sep 17 00:00:00 2001 | ||
2 | From: Jonas Witschel <diabonas@gmx.de> | ||
3 | Date: Fri, 14 May 2021 12:03:24 +0200 | ||
4 | Subject: [PATCH] build: only use -Werror for non-release builds | ||
5 | |||
6 | While we want to catch any compiler warnings during development, a release | ||
7 | build should never fail due to e.g. stricter static checks introduced by new | ||
8 | compiler versions. | ||
9 | |||
10 | Upstream-Status: Backport | ||
11 | [https://github.com/tpm2-software/tpm2-tools/commit/a691a7de76a5d57af90a868d68c5f48e4e47015b] | ||
12 | |||
13 | Signed-off-by: Jonas Witschel <diabonas@gmx.de> | ||
14 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
15 | --- | ||
16 | configure.ac | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/configure.ac b/configure.ac | ||
20 | index 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 | -- | ||
33 | 2.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" | |||
9 | SRC_URI = "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz \ | 9 | SRC_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 | ||
14 | SRC_URI[md5sum] = "48e0f58232b6a86fe4d007acf12af283" | 15 | SRC_URI[md5sum] = "48e0f58232b6a86fe4d007acf12af283" |