From 18afa41de48c5558bc2025c6cfe7674ce3cbc1e1 Mon Sep 17 00:00:00 2001 From: Etienne Carriere Date: Mon, 25 Oct 2021 09:34:57 +0200 Subject: [PATCH] package/optee-client: remove dependency on BR2_STATIC_LIBS Restore support for BR2_STATIC_LIBS in optee-client, removed by [1] to overcome an issue introduced in OP-TEE 3.13.0 that mandates support for shared libraries. As OP-TEE expects to be functional on OSes without dynamic shared library support, change [2] was merged in OP-TEE tag 3.15.0 to fix the initial issue introducing new configuration switch CFG_TEE_SUPP_PLUGIN. When disabled, optee-client plugin support is not embedded and optee-client can built with static libraries support only. Link: [1] commit 321a850bc734 ("package/optee-client: add dependency on !BR2_STATIC_LIBS") Link: [2] https://github.com/OP-TEE/optee_client/commit/f59114370f267f0b3341870b6cf1e1c88d184b3f Signed-off-by: Etienne Carriere Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/optee-client/Config.in | 12 +++++++++--- package/optee-client/optee-client.mk | 6 ++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/package/optee-client/Config.in b/package/optee-client/Config.in index 2765f49308..e774d70484 100644 --- a/package/optee-client/Config.in +++ b/package/optee-client/Config.in @@ -1,7 +1,6 @@ config BR2_PACKAGE_OPTEE_CLIENT bool "optee-client" depends on BR2_TOOLCHAIN_HAS_THREADS - depends on !BR2_STATIC_LIBS # dlfcn.h depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 # MMC_IOC_MULTI_CMD help Enable the OP-TEE client package that brings non-secure @@ -25,8 +24,15 @@ config BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH normal world OS providing the actual storage via tee-supplicant. +config BR2_PACKAGE_OPTEE_CLIENT_SUPP_PLUGINS + bool "Enable TEE supplicant plugins" + default y + depends on !BR2_STATIC_LIBS # dlfcn.h + help + Enable TEE supplicant plugin support. + endif -comment "optee-client needs a toolchain w/ threads, dynamic library, headers >= 4.3" - depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || \ +comment "optee-client needs a toolchain w/ threads, headers >= 4.3" + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 diff --git a/package/optee-client/optee-client.mk b/package/optee-client/optee-client.mk index 20147c89a8..9a73a8a761 100644 --- a/package/optee-client/optee-client.mk +++ b/package/optee-client/optee-client.mk @@ -14,6 +14,12 @@ OPTEE_CLIENT_CONF_OPTS = \ -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) \ -DCFG_WERROR=OFF +ifeq ($(BR2_PACKAGE_OPTEE_CLIENT_SUPP_PLUGINS),y) +OPTEE_CLIENT_CONF_OPTS += -DCFG_TEE_SUPP_PLUGINS=ON +else +OPTEE_CLIENT_CONF_OPTS += -DCFG_TEE_SUPP_PLUGINS=OFF +endif + define OPTEE_CLIENT_INSTALL_INIT_SYSV $(INSTALL) -m 0755 -D $(OPTEE_CLIENT_PKGDIR)/S30optee \ $(TARGET_DIR)/etc/init.d/S30optee