]> code.ossystems Code Review - openembedded-core.git/commit
openssl: Use linux-latomic target for ARC
authorAlexey Brodkin <abrodkin@synopsys.com>
Tue, 7 Dec 2021 16:02:41 +0000 (08:02 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 8 Dec 2021 20:22:07 +0000 (20:22 +0000)
commitf48227a192022c604f8c2ea4fe973c6664861101
tree66b0460833544155d37b856b8dbecf131aa8f13d
parent6add96e4af46eaabb6c70e3ce3a27a4b198d7cb6
openssl: Use linux-latomic target for ARC

Some atomic ops for 32-bit ARC processors are implemented in GCC's libatomic.
For example those dealing with 64-bit data (e.g. __atomic_load_8()) as well as
some others. That said it's required to add "-latomic" for successful linkage.

Otherwise error messages like this happen on OpenSSL building for ARC:
------------------------------->8------------------------------
| ...ld: libcrypto.a(libcrypto-lib-threads_pthread.o): in function `CRYPTO_atomic_or':
| .../openssl-3.0.0/crypto/threads_pthread.c:219: undefined reference to `__atomic_is_lock_free'
| ...ld: .../openssl-3.0.0/crypto/threads_pthread.c:219: undefined reference to `__atomic_is_lock_free'
| ...ld: .../openssl-3.0.0/crypto/threads_pthread.c:220: undefined reference to `__atomic_fetch_or_8'
------------------------------->8------------------------------

Fix that by using a special target, which does exactly what's needed.
See [1] and [2] for more details on the matter.

[1] https://github.com/openssl/openssl/commit/cdf2986a70d92668d882eb29737225f1aaafd0f1
[2] https://github.com/openssl/openssl/pull/15640

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-connectivity/openssl/openssl_3.0.0.bb