* [PATCH] openssl: Use linux-latomic target for ARC
@ 2021-12-07 15:59 Alexey Brodkin
2021-12-07 16:06 ` Alexey Brodkin
0 siblings, 1 reply; 3+ messages in thread
From: Alexey Brodkin @ 2021-12-07 15:59 UTC (permalink / raw)
To: openembedded-devel; +Cc: linux-snps-arc, Alexey Brodkin
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>
---
meta/recipes-connectivity/openssl/openssl_3.0.0.bb | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/recipes-connectivity/openssl/openssl_3.0.0.bb b/meta/recipes-connectivity/openssl/openssl_3.0.0.bb
index 4b1ae71a85..da73ed6bc3 100644
--- a/meta/recipes-connectivity/openssl/openssl_3.0.0.bb
+++ b/meta/recipes-connectivity/openssl/openssl_3.0.0.bb
@@ -70,6 +70,9 @@ do_configure () {
esac
target="$os-${HOST_ARCH}"
case $target in
+ linux-arc)
+ target=linux-latomic
+ ;;
linux-arm*)
target=linux-armv4
;;
--
2.16.2
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] openssl: Use linux-latomic target for ARC
2021-12-07 15:59 [PATCH] openssl: Use linux-latomic target for ARC Alexey Brodkin
@ 2021-12-07 16:06 ` Alexey Brodkin
0 siblings, 0 replies; 3+ messages in thread
From: Alexey Brodkin @ 2021-12-07 16:06 UTC (permalink / raw)
To: openembedded-devel; +Cc: linux-snps-arc
Hello,
Please disregard this patch, as it was meant for OE-core,
where it is now posted, see https://lists.openembedded.org/g/openembedded-core/message/159312
-Alexey
> From: Alexey Brodkin <abrodkin@synopsys.com>
> Sent: Tuesday, December 7, 2021 6:59 PM
> To: openembedded-devel@lists.openembedded.org <openembedded-devel@lists.openembedded.org>
> Cc: linux-snps-arc@lists.infradead.org <linux-snps-arc@lists.infradead.org>; Alexey Brodkin <abrodkin@synopsys.com>
> Subject: [PATCH] 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>
> ---
> meta/recipes-connectivity/openssl/openssl_3.0.0.bb | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/meta/recipes-connectivity/openssl/openssl_3.0.0.bb b/meta/recipes-connectivity/openssl/openssl_3.0.0.bb
> index 4b1ae71a85..da73ed6bc3 100644
> --- a/meta/recipes-connectivity/openssl/openssl_3.0.0.bb
> +++ b/meta/recipes-connectivity/openssl/openssl_3.0.0.bb
> @@ -70,6 +70,9 @@ do_configure () {
> esac
> target="$os-${HOST_ARCH}"
> case $target in
> + linux-arc)
> + target=linux-latomic
> + ;;
> linux-arm*)
> target=linux-armv4
> ;;
> --
> 2.16.2
>
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] openssl: Use linux-latomic target for ARC
@ 2021-12-07 16:02 Alexey Brodkin
0 siblings, 0 replies; 3+ messages in thread
From: Alexey Brodkin @ 2021-12-07 16:02 UTC (permalink / raw)
To: openembedded-core; +Cc: linux-snps-arc, Alexey Brodkin
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>
---
Please pardon that re-send as initially I erroneously
sent it to OE-devel. Sending it to the right one now!
---
meta/recipes-connectivity/openssl/openssl_3.0.0.bb | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/recipes-connectivity/openssl/openssl_3.0.0.bb b/meta/recipes-connectivity/openssl/openssl_3.0.0.bb
index 4b1ae71a85..da73ed6bc3 100644
--- a/meta/recipes-connectivity/openssl/openssl_3.0.0.bb
+++ b/meta/recipes-connectivity/openssl/openssl_3.0.0.bb
@@ -70,6 +70,9 @@ do_configure () {
esac
target="$os-${HOST_ARCH}"
case $target in
+ linux-arc)
+ target=linux-latomic
+ ;;
linux-arm*)
target=linux-armv4
;;
--
2.16.2
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-07 16:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-07 15:59 [PATCH] openssl: Use linux-latomic target for ARC Alexey Brodkin
2021-12-07 16:06 ` Alexey Brodkin
2021-12-07 16:02 Alexey Brodkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).