tpm2-{tss, abrmd, tools} fix compilation errors
cover tpm2-{tss, abrmd, tools} fix compilation errors
Declare dependency on a toolchain with C++ because tpm2-tss 1.4.0 still contains some C++ code. This has already changed on upstream, so future versions will drop the dependency on a C++ compiler.
Declare dependencies of tpm2-tools on MMU, threads and wchar (for libglib and dbus).
Disable stack smashing protection if the toolchain does not support it. This must be done explicitly because the configuration scripts attempt to enable SSP without proper testing.
Carlos Santos (6):
tpm2-tss: declare dependency on a toolchain with C++
tpm2-tss: allow building without stack smashing protection (SSP)
tpm2-abrmd: declare dependency on a toolchain with C++
tpm2-abrmd: allow building without stack smashing protection (SSP)
tpm2-tools: propagate dependencies of selected packages
tpm2-tools: allow building without stack smashing protection (SSP)
package/tpm2-abrmd/Config.in | 5 +++-- package/tpm2-abrmd/tpm2-abrmd.mk | 4 ++++ package/tpm2-tools/Config.in | 8 ++++++++ package/tpm2-tools/tpm2-tools.mk | 4 ++++ package/tpm2-tss/Config.in | 3 +++ package/tpm2-tss/tpm2-tss.mk | 4 ++++ 6 files changed, 26 insertions(+), 2 deletions(-)
Signature · 1 line
2.14.3
PATCH 1/6 tpm2-tss: declare dependency on a toolchain with C++
Version 1.4.0 still contains some C++ code. This has already changed on upstream, so future versions will drop the dependency on a C++ compiler.
--- package/tpm2-tss/Config.in | 3 +++ 1 file changed, 3 insertions(+)
package/tpm2-tss/Config.in +3 -0
@@ -29,3 +29,6 @@ config BR2_PACKAGE_TPM2_TSS Microsoft software TPM2 simulator. https://github.com/tpm2-software/tpm2-tss + +comment "tpm2-tss needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP
Signature · 1 line
2.14.3
PATCH 1/6 tpm2-tss: declare dependency on a toolchain with C++
Quoted 15 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Carlos" == Carlos Santos <[email protected]> writes:
Version 1.4.0 still contains some C++ code. This has already changed on upstream, so future versions will drop the dependency on a C++ compiler.
Signed-off-by Carlos Santos <[email protected]>--- package/tpm2-tss/Config.in | 3 +++ 1 file changed, 3 insertions(+)package/tpm2-tss/Config.in +0
-0
package/tpm2-tss/Config.in config BR2_PACKAGE_TPM2_TSS · line 34
Quoted 6 lines
package/tpm2-tss/Config.in +3
-0@@ -29,3 +29,6 @@ config BR2_PACKAGE_TPM2_TSS Microsoft software TPM2 simulator. https://github.com/tpm2-software/tpm2-tss + +comment "tpm2-tss needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP
This should have been indented with a <tab> and the BR2_PACKAGE_TPM2_TSS option should also have the C++ dependency.
Consider running utils/check-package on your patches.
Committed with that fixed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/6 tpm2-tss: allow building without stack smashing protection (SSP)
In reply to Carlos SantosDisable SSP if the toolchain does not support it. This must be done explicitly because configure.ac passes -fstack-protector-all to the compiler but doesn't contain a link test, so it doesn't detect when libssp is missing.
Fixes:
http://autobuild.buildroot.net/results/f98749311c5a4338f5fbd6d29c9ca29ac6c24abd
http://autobuild.buildroot.net/results/4112a001038eb5e04c67c7b5c79280813d196911
http://autobuild.buildroot.net/results/451fcf7e36ea8774967b84279abb89ffb0fd6923
http://autobuild.buildroot.net/results/8e1181836249105be28f04a59cf6d31afcea91d7
http://autobuild.buildroot.net/results/49151df111ad3d03c70551e4516c3d3b36e12d70
http://autobuild.buildroot.net/results/42d625c579a8a16fb0c0a3df441ea186c3d52b9a
http://autobuild.buildroot.net/results/b0af881e080c4fcc6094489c037ee853fdf42869
http://autobuild.buildroot.net/results/0909d94af3f9589dd6b8897e2501c05b421262c4
http://autobuild.buildroot.net/results/2fd0ee29c0b28cb1fee1b43433ab8373f49ca397
http://autobuild.buildroot.net/results/3fa19441fd2594b064c8ff759df8849705100a65
http://autobuild.buildroot.net/results/8675d2aa8f1e8e568a42bc0dbfae8f3721e86796
http://autobuild.buildroot.net/results/786de50b53fa9a325c92a5d48f3928082eff0045
http://autobuild.buildroot.net/results/a575b340f7cc562c1b87eb31d4304131b52698a7
http://autobuild.buildroot.net/results/0b1d50d9e266d889d7e848275ebfbce45ccb419d
http://autobuild.buildroot.net/results/d632b0e1efbb5e133dfb6595554badea9e31c492
http://autobuild.buildroot.net/results/0c95459bfa82048d7e99661cf5f2d6d393179090
http://autobuild.buildroot.net/results/bd494dc69fb0da46065f10a3cd8a4cab0bcbcc9b
http://autobuild.buildroot.net/results/b397e44cd17b3d576cc55f02d5463e9c14743907
http://autobuild.buildroot.net/results/40ed7a3b519c18102df515b5c4b993ed9a488236
http://autobuild.buildroot.net/results/e5fc04c2ded86e03eb174a89845a50f52e407d48
http://autobuild.buildroot.net/results/95a7c14da225d9e42545ee7a155f461303c62aa6
http://autobuild.buildroot.net/results/25ebda7a13afa4790ad28018f42c46a795f3c284
http://autobuild.buildroot.net/results/1bc081b78c625f13327c733fc734e36fe28ecc2a
http://autobuild.buildroot.net/results/273108e2798155464109b9fb4d16884e7d0f9ab3
http://autobuild.buildroot.net/results/f677d340cd42ea7242d4102fbb5fa6091a05e8ef
http://autobuild.buildroot.net/results/ae15b625260801b494bbfa541ef86edcdbaedfe0
--- package/tpm2-tss/tpm2-tss.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/tpm2-tss/tpm2-tss.mk +4 -0
@@ -11,4 +11,8 @@ TPM2_TSS_LICENSE_FILES = LICENSE TPM2_TSS_INSTALL_STAGING = YES TPM2_TSS_DEPENDENCIES = liburiparser host-pkgconf +# configure.ac doesn't contain a link test, so it doesn't detect when +# libssp is missing. +TPM2_TSS_CONF_ENV = ax_cv_check_cflags___________Wall__Werror_______fstack_protector_all=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no) + $(eval $(autotools-package))
Signature · 1 line
2.14.3
PATCH 2/6 tpm2-tss: allow building without stack smashing protection (SSP)
Quoted 45 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Carlos" == Carlos Santos <[email protected]> writes:
Disable SSP if the toolchain does not support it. This must be done explicitly because configure.ac passes -fstack-protector-all to the compiler but doesn't contain a link test, so it doesn't detect when libssp is missing.
Fixes:
http://autobuild.buildroot.net/results/f98749311c5a4338f5fbd6d29c9ca29ac6c24abd
http://autobuild.buildroot.net/results/4112a001038eb5e04c67c7b5c79280813d196911
http://autobuild.buildroot.net/results/451fcf7e36ea8774967b84279abb89ffb0fd6923
http://autobuild.buildroot.net/results/8e1181836249105be28f04a59cf6d31afcea91d7
http://autobuild.buildroot.net/results/49151df111ad3d03c70551e4516c3d3b36e12d70
http://autobuild.buildroot.net/results/42d625c579a8a16fb0c0a3df441ea186c3d52b9a
http://autobuild.buildroot.net/results/b0af881e080c4fcc6094489c037ee853fdf42869
http://autobuild.buildroot.net/results/0909d94af3f9589dd6b8897e2501c05b421262c4
http://autobuild.buildroot.net/results/2fd0ee29c0b28cb1fee1b43433ab8373f49ca397
http://autobuild.buildroot.net/results/3fa19441fd2594b064c8ff759df8849705100a65
http://autobuild.buildroot.net/results/8675d2aa8f1e8e568a42bc0dbfae8f3721e86796
http://autobuild.buildroot.net/results/786de50b53fa9a325c92a5d48f3928082eff0045
http://autobuild.buildroot.net/results/a575b340f7cc562c1b87eb31d4304131b52698a7
http://autobuild.buildroot.net/results/0b1d50d9e266d889d7e848275ebfbce45ccb419d
http://autobuild.buildroot.net/results/d632b0e1efbb5e133dfb6595554badea9e31c492
http://autobuild.buildroot.net/results/0c95459bfa82048d7e99661cf5f2d6d393179090
http://autobuild.buildroot.net/results/bd494dc69fb0da46065f10a3cd8a4cab0bcbcc9b
http://autobuild.buildroot.net/results/b397e44cd17b3d576cc55f02d5463e9c14743907
http://autobuild.buildroot.net/results/40ed7a3b519c18102df515b5c4b993ed9a488236
http://autobuild.buildroot.net/results/e5fc04c2ded86e03eb174a89845a50f52e407d48
http://autobuild.buildroot.net/results/95a7c14da225d9e42545ee7a155f461303c62aa6
http://autobuild.buildroot.net/results/25ebda7a13afa4790ad28018f42c46a795f3c284
http://autobuild.buildroot.net/results/1bc081b78c625f13327c733fc734e36fe28ecc2a
http://autobuild.buildroot.net/results/273108e2798155464109b9fb4d16884e7d0f9ab3
http://autobuild.buildroot.net/results/f677d340cd42ea7242d4102fbb5fa6091a05e8ef
http://autobuild.buildroot.net/results/ae15b625260801b494bbfa541ef86edcdbaedfe0Signed-off-by Carlos Santos <[email protected]>--- package/tpm2-tss/tpm2-tss.mk | 4 ++++ 1 file changed, 4 insertions(+)package/tpm2-tss/tpm2-tss.mk +0
-0
package/tpm2-tss/tpm2-tss.mk TPM2_TSS_LICENSE_FILES = LICENSE · line 16
Quoted 6 lines
package/tpm2-tss/tpm2-tss.mk +3
-0@@ -11,4 +11,8 @@ TPM2_TSS_LICENSE_FILES = LICENSE TPM2_TSS_INSTALL_STAGING = YES TPM2_TSS_DEPENDENCIES = liburiparser host-pkgconf +# configure.ac doesn't contain a link test, so it doesn't detect when +# libssp is missing. +TPM2_TSS_CONF_ENV = ax_cv_check_cflags___________Wall__Werror_______fstack_protector_all=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no)
Funky variable name ;)
Does this mean that tpm2-tss is built with -Wall -Werror? If so, that unfortunately tends to cause compilations as even minor issues are treated as errors.
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 3/6 tpm2-abrmd: declare dependency on a toolchain with C++
In reply to Carlos SantosIt depends on tpm2-tss, whose current version contains C++ code.
--- package/tpm2-abrmd/Config.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
package/tpm2-abrmd/Config.in +3 -2
@@ -20,6 +20,7 @@ config BR2_PACKAGE_TPM2_ABRMD https://github.com/tpm2-software/tpm2-abrmd -comment "tpm2-abrmd needs a toolchain w/ wchar, threads" +comment "tpm2-abrmd needs a toolchain w/ C++, wchar, threads" depends on BR2_USE_MMU - depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR \ + || !BR2_TOOLCHAIN_HAS_THREADS
Signature · 1 line
2.14.3
PATCH 3/6 tpm2-abrmd: declare dependency on a toolchain with C++
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Carlos" == Carlos Santos <[email protected]> writes:
It depends on tpm2-tss, whose current version contains C++ code.
Signed-off-by Carlos Santos <[email protected]>--- package/tpm2-abrmd/Config.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)package/tpm2-abrmd/Config.in +0
-0
package/tpm2-abrmd/Config.in config BR2_PACKAGE_TPM2_ABRMD · line 23
Quoted 5 lines
package/tpm2-abrmd/Config.in +1
-1@@ -20,6 +20,7 @@ config BR2_PACKAGE_TPM2_ABRMD https://github.com/tpm2-software/tpm2-abrmd -comment "tpm2-abrmd needs a toolchain w/ wchar, threads" +comment "tpm2-abrmd needs a toolchain w/ C++, wchar, threads"
You again forgot to add the dependency to the config symbol itself.
Committed with that fixed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 4/6 tpm2-abrmd: allow building without stack smashing protection (SSP)
In reply to Carlos SantosDisable SSP if the toolchain does not support it. This must be done explicitly because configure.ac passes -fstack-protector-all to the compiler but doesn't contain a link test, so it doesn't detect when libssp is missing.
Fixes:
http://autobuild.buildroot.net/results/83ad1f33f523321f841e70d2d8cf5ce861dee217
http://autobuild.buildroot.net/results/cef047751534fef23d1022e9a276424bc84bf461
http://autobuild.buildroot.net/results/6048355337804f7841dffa1655f44b9f6db56314
http://autobuild.buildroot.net/results/d934a2ea90e7bf1c7b93dbb367998abab536daf4
http://autobuild.buildroot.net/results/c0daaf37b8d1515d62d2441ba6aa57125437e191
http://autobuild.buildroot.net/results/9482ea5554938865e0061dcbdcf3c2c918b96954
http://autobuild.buildroot.net/results/282a8b6769f19f0a40089207bc54e7302663751f
--- package/tpm2-abrmd/tpm2-abrmd.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/tpm2-abrmd/tpm2-abrmd.mk +4 -0
@@ -11,6 +11,10 @@ TPM2_ABRMD_LICENSE_FILES = LICENSE TPM2_ABRMD_INSTALL_STAGING = YES TPM2_ABRMD_DEPENDENCIES = dbus libglib2 tpm2-tss host-pkgconf +# configure.ac doesn't contain a link test, so it doesn't detect when +# libssp is missing. +TPM2_ABRMD_CONF_ENV = ax_cv_check_cflags___fstack_protector_all=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no) + TPM2_ABRMD_CONF_OPTS += \ --with-systemdsystemunitdir=$(if $(BR2_INIT_SYSTEMD),/usr/lib/systemd/system,no) \ --with-udevrulesdir=$(if $(BR2_PACKAGE_HAS_UDEV),/usr/lib/udev/rules.d,no)
Signature · 1 line
2.14.3
PATCH 4/6 tpm2-abrmd: allow building without stack smashing protection (SSP)
Quoted 26 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Carlos" == Carlos Santos <[email protected]> writes:
Disable SSP if the toolchain does not support it. This must be done explicitly because configure.ac passes -fstack-protector-all to the compiler but doesn't contain a link test, so it doesn't detect when libssp is missing.
Fixes:
http://autobuild.buildroot.net/results/83ad1f33f523321f841e70d2d8cf5ce861dee217
http://autobuild.buildroot.net/results/cef047751534fef23d1022e9a276424bc84bf461
http://autobuild.buildroot.net/results/6048355337804f7841dffa1655f44b9f6db56314
http://autobuild.buildroot.net/results/d934a2ea90e7bf1c7b93dbb367998abab536daf4
http://autobuild.buildroot.net/results/c0daaf37b8d1515d62d2441ba6aa57125437e191
http://autobuild.buildroot.net/results/9482ea5554938865e0061dcbdcf3c2c918b96954
http://autobuild.buildroot.net/results/282a8b6769f19f0a40089207bc54e7302663751fSigned-off-by Carlos Santos <[email protected]>--- package/tpm2-abrmd/tpm2-abrmd.mk | 4 ++++ 1 file changed, 4 insertions(+)package/tpm2-abrmd/tpm2-abrmd.mk +0
-0
package/tpm2-abrmd/tpm2-abrmd.mk TPM2_ABRMD_LICENSE_FILES = LICENSE · line 14
Quoted 4 lines
package/tpm2-abrmd/tpm2-abrmd.mk +1
-0@@ -11,6 +11,10 @@ TPM2_ABRMD_LICENSE_FILES = LICENSE TPM2_ABRMD_INSTALL_STAGING = YES TPM2_ABRMD_DEPENDENCIES = dbus libglib2 tpm2-tss host-pkgconf +# configure.ac doesn't contain a link test, so it doesn't detect when
You have a trailing space here. Committed with that fixed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 5/6 tpm2-tools: propagate dependencies of selected packages
In reply to Carlos Santos- C++ (tpm2-tss)
- MMU (dbus, libglib)
- threads (libglib)
- wchar (libglib -> gettext)
Fixes (libglib):
http://autobuild.buildroot.net/results/786859fccc477de1519d85d8a180626bb8ebe062
http://autobuild.buildroot.net/results/df6518f331c16b477c6e934914d0e56dc102c228
--- package/tpm2-tools/Config.in | 8 ++++++++ 1 file changed, 8 insertions(+)
package/tpm2-tools/Config.in +8 -0
@@ -1,5 +1,8 @@ config BR2_PACKAGE_TPM2_TOOLS bool "tpm2-tools" + depends on BR2_USE_MMU # dbus, libglib + depends on BR2_USE_WCHAR # libglib -> gettext + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib select BR2_PACKAGE_DBUS select BR2_PACKAGE_LIBCURL select BR2_PACKAGE_LIBGLIB2
@@ -14,3 +17,8 @@ config BR2_PACKAGE_TPM2_TOOLS implementation. https://github.com/tpm2-software/tpm2-tools + +comment "tpm2-tools needs a toolchain w/ C++, wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR \ + || !BR2_TOOLCHAIN_HAS_THREADS
Signature · 1 line
2.14.3
PATCH 5/6 tpm2-tools: propagate dependencies of selected packages
Quoted 22 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Carlos" == Carlos Santos <[email protected]> writes:
- C++ (tpm2-tss)
- MMU (dbus, libglib)
- threads (libglib)
- wchar (libglib -> gettext)Fixes (libglib):
http://autobuild.buildroot.net/results/786859fccc477de1519d85d8a180626bb8ebe062
http://autobuild.buildroot.net/results/df6518f331c16b477c6e934914d0e56dc102c228Signed-off-by Baruch Siach <[email protected]>Signed-off-by Carlos Santos <[email protected]>--- package/tpm2-tools/Config.in | 8 ++++++++ 1 file changed, 8 insertions(+)package/tpm2-tools/Config.in +0
-0
package/tpm2-tools/Config.in line 5
Quoted 5 lines
package/tpm2-tools/Config.in +3
-0@@ -1,5 +1,8 @@ config BR2_PACKAGE_TPM2_TOOLS bool "tpm2-tools" + depends on BR2_USE_MMU # dbus, libglib + depends on BR2_USE_WCHAR # libglib -> gettext + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib
You forgot BR2_INSTALL_LIBSTDCPP. Committed with that fixed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 6/6 tpm2-tools: allow building without stack smashing protection (SSP)
In reply to Carlos SantosDisable 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.
--- package/tpm2-tools/tpm2-tools.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/tpm2-tools/tpm2-tools.mk +4 -0
@@ -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))
Signature · 1 line
2.14.3
PATCH 6/6 tpm2-tools: allow building without stack smashing protection (SSP)
Quoted 16 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Carlos" == Carlos Santos <[email protected]> writes:
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 <[email protected]>--- package/tpm2-tools/tpm2-tools.mk | 4 ++++ 1 file changed, 4 insertions(+)package/tpm2-tools/tpm2-tools.mk +0
-0
package/tpm2-tools/tpm2-tools.mk TPM2_TOOLS_LICENSE = BSD-2-Clause · line 13
Quoted 4 lines
package/tpm2-tools/tpm2-tools.mk +1
-0@@ -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
A trailing space here. Committed with that fixed, thanks.
Signature · 1 line
Bye, Peter Korsgaard