Message ID | 20220730162741.3624780-1-raj.khem@gmail.com |
---|---|
State | New |
Headers | show |
Series | optee-test: Use system openssl on musl | expand |
> On 30 Jul 2022, at 17:27, Khem Raj via lists.yoctoproject.org <raj.khem=gmail.com@lists.yoctoproject.org> wrote: > > 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 This sounds like something that should be done always, and not just on musl builds. Ross
On Sat, Jul 30, 2022 at 3:30 PM Ross Burton <Ross.Burton@arm.com> wrote: > > > > On 30 Jul 2022, at 17:27, Khem Raj via lists.yoctoproject.org <raj.khem= > gmail.com@lists.yoctoproject.org> wrote: > > > > 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 > > This sounds like something that should be done always, and not just on > musl builds. One would think so but that seems to be not the case there is a vendored version on libcrypto.a and that’s the default I also opened an issue upstream to at least build the static archive such that’s it’s compatible with musl and glibc see https://github.com/OP-TEE/optee_test/issues/607 Also see this one for related comments https://github.com/OP-TEE/optee_test/issues/599 > > Ross
On Sat, 30 Jul 2022 09:27:41 -0700, Khem Raj wrote: > 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 > > [...] Applied, thanks! [1/1] optee-test: Use system openssl on musl commit: 31452ae4cf0be3d2d78a4019e44f9370b9e93fbb Best regards,
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 6fa10e7..18870da 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"
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 <raj.khem@gmail.com> --- meta-arm/recipes-security/optee/optee-test_3.17.0.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)