aboutsummaryrefslogtreecommitdiff
path: root/package/tpm2-tss/tpm2-tss.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/tpm2-tss/tpm2-tss.mk')
-rw-r--r--package/tpm2-tss/tpm2-tss.mk24
1 files changed, 15 insertions, 9 deletions
diff --git a/package/tpm2-tss/tpm2-tss.mk b/package/tpm2-tss/tpm2-tss.mk
index e02abb446c..470020857a 100644
--- a/package/tpm2-tss/tpm2-tss.mk
+++ b/package/tpm2-tss/tpm2-tss.mk
@@ -4,20 +4,26 @@
#
################################################################################
-TPM2_TSS_VERSION = 2.1.3
+TPM2_TSS_VERSION = 2.3.3
TPM2_TSS_SITE = https://github.com/tpm2-software/tpm2-tss/releases/download/$(TPM2_TSS_VERSION)
TPM2_TSS_LICENSE = BSD-2-Clause
TPM2_TSS_LICENSE_FILES = LICENSE
TPM2_TSS_INSTALL_STAGING = YES
TPM2_TSS_DEPENDENCIES = liburiparser openssl host-pkgconf
-TPM2_TSS_CONF_OPTS = --with-crypto=ossl --disable-doxygen-doc
+TPM2_TSS_CONF_OPTS = --with-crypto=ossl --disable-doxygen-doc --disable-defaultflags
+# 0001-configure-Only-use-CXX-when-fuzzing.patch
+TPM2_TSS_AUTORECONF = YES
-# -fstack-protector-all and FORTIFY_SOURCE=2 is used by
-# default. Disable that so the BR2_SSP_* / BR2_FORTIFY_SOURCE_* options
-# in the toolchain wrapper and CFLAGS are used instead
-TPM2_TSS_CONF_ENV = \
- ax_cv_check_cflags___________Wall__Werror_______fstack_protector_all=no \
- ax_cv_check_ccppflags___________Wall__Werror_______U_FORTIFY_SOURCE=no \
- ax_cv_check_ccppflags___________Wall__Werror_______D_FORTIFY_SOURCE_2=no
+# uses C99 code but forgets to pass -std=c99 when --disable-defaultflags is used
+TPM2_TSS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=c99"
+
+# The 2.3.3 tarball accidently contains a Makefile-fuzz-generated.am
+# with content from a fuzz testing run rather than an empty file,
+# confusing autoreconf with
+# 0001-configure-Only-use-CXX-when-fuzzing.patch
+define TPM2_TSS_TRUNCATE_MAKEFILE_FUZZ_GENERATED_AM
+ truncate -s 0 $(@D)/Makefile-fuzz-generated.am
+endef
+TPM2_TSS_POST_PATCH_HOOKS += TPM2_TSS_TRUNCATE_MAKEFILE_FUZZ_GENERATED_AM
$(eval $(autotools-package))