tpm2-tools: allow building without stack smashing protection (SSP)
authorCarlos Santos <casantos@datacom.ind.br>
Thu, 22 Mar 2018 20:27:52 +0000 (17:27 -0300)
committerPeter Korsgaard <peter@korsgaard.com>
Thu, 22 Mar 2018 23:02:11 +0000 (00:02 +0100)
Disable SSP if the toolchain does not support it. This must be done
explicitly because configure enables hardening by default but doesn't
contain a link test, so it doesn't detect when libssp is missing.

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/tpm2-tools/tpm2-tools.mk

index 0697900d2d2ed42fb188e06c54991a345af1dfda..13fdb163bb119ab2f48a292aab68b94c07c05961 100644 (file)
@@ -10,4 +10,8 @@ TPM2_TOOLS_LICENSE = BSD-2-Clause
 TPM2_TOOLS_LICENSE_FILES = LICENSE
 TPM2_TOOLS_DEPENDENCIES = dbus libcurl libglib2 openssl tpm2-tss host-pkgconf
 
+# configure.ac doesn't contain a link test, so it doesn't detect when
+# libssp is missing.
+TPM2_TOOLS_CONF_OPTS = $(if $(BR2_TOOLCHAIN_HAS_SSP),--enable-hardening,--disable-hardening)
+
 $(eval $(autotools-package))