From 31452ae4cf0be3d2d78a4019e44f9370b9e93fbb Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 30 Jul 2022 09:27:41 -0700 Subject: [PATCH] optee-test: Use system openssl on musl bundled libcrypto.a in optee-test sources is built using glibc based toolchain and expects foritied _chk version of the libc functions e.g. __sprintf_chk which wont work for musl. Therefore rely on freshly built openssl by OE instead Fixes errors like arm-yoe-linux-musleabi/gcc/arm-yoe-linux-musleabi/12.1.0/ld: ../openssl/lib/arm/libcrypto.a(dso_dlfcn.o): in function `dlfcn_name_converter': dso_dlfcn.c:(.text+0x19e): undefined reference to `__sprintf_chk' Signed-off-by: Khem Raj Signed-off-by: Jon Mason --- meta-arm/recipes-security/optee/optee-test_3.17.0.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta-arm/recipes-security/optee/optee-test_3.17.0.bb b/meta-arm/recipes-security/optee/optee-test_3.17.0.bb index 6fa10e78..18870da8 100644 --- a/meta-arm/recipes-security/optee/optee-test_3.17.0.bb +++ b/meta-arm/recipes-security/optee/optee-test_3.17.0.bb @@ -3,5 +3,8 @@ require optee-test.inc SRC_URI:append = " \ file://musl-workaround.patch \ " - SRCREV = "44a31d02379bd8e50762caa5e1592ad81e3339af" + +EXTRA_OEMAKE:append:libc-musl = " OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}" +DEPENDS:append:libc-musl = " openssl" +CFLAGS:append:libc-musl = " -Wno-error=deprecated-declarations"