re: 8.2 openssl-1.1.1s undefined reference to `__atomic_is_lock_free'

matthew green <[email protected]>
Newsgroups gmane.os.netbsd.ports.sparc
Message-ID <[email protected]>
Riccardo Mottola writes:
> looking back, we had the same issuein 2020...
>
> The solution proposed by ROmain was to comment out this code:
>
> int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock)
> {
> #if 0
> # if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL)
>     if (__atomic_is_lock_free(sizeof(*val), val)) {
>         *ret = __atomic_add_fetch(val, amount, __ATOMIC_ACQ_REL);
>         return 1;
>     }
> # endif
> #endif

infact, we have this patch in -current still:

Index: crypto/external/bsd/openssl/dist/crypto/threads_pthread.c
...
 int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock)
 {
+#ifdef notyet
+// We don't provide yet __atomic_is_lock_free
 # if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL)


(note for the context-free patch -- the add is handled in
code underneath this, but it's ugly.)


.mrg.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.