[OpenSSL-3.0LTS] TNF HEAD's 32bit arch disables __atomic_* in threads_pthread.c by -DBROKEN_CLANG_ATOMICS

Issue #371 resolved
Takehiko NOZAKI repo owner created an issue

\$ grep -r BROKEN_CLANG_ATOMICS crypto/external/bsd/openssl/lib/libcrypto/arch
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc:COPTS.threads_pthread.c += -DBROKEN_CLANG_ATOMICS # no atomic 64 bit ops
crypto/external/bsd/openssl/lib/libcrypto/arch/hppa/crypto.inc:COPTS.threads_pthread.c += -DBROKEN_CLANG_ATOMICS # no atomic 64 bit ops
crypto/external/bsd/openssl/lib/libcrypto/arch/i386/crypto.inc:COPTS.threads_pthread.c += -DBROKEN_CLANG_ATOMICS # no atomic 64 bit ops
crypto/external/bsd/openssl/lib/libcrypto/arch/m68k/crypto.inc:COPTS.threads_pthread.c += -DBROKEN_CLANG_ATOMICS # no atomic 64 bit ops
crypto/external/bsd/openssl/lib/libcrypto/arch/mips/crypto.inc:COPTS.threads_pthread.c += -DBROKEN_CLANG_ATOMICS # no atomic 64 bit ops
crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc:COPTS.threads_pthread.c += -DBROKEN_CLANG_ATOMICS # no atomic 64 bit ops
crypto/external/bsd/openssl/lib/libcrypto/arch/riscv32/crypto.inc:COPTS.threads_pthread.c += -DBROKEN_CLANG_ATOMICS # no atomic 64 bit ops
crypto/external/bsd/openssl/lib/libcrypto/arch/sh3/crypto.inc:COPTS.threads_pthread.c += -DBROKEN_CLANG_ATOMICS # no atomic 64 bit ops
crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:COPTS.threads_pthread.c += -DBROKEN_CLANG_ATOMICS # no atomic 64 bit ops
crypto/external/bsd/openssl/lib/libcrypto/arch/vax/crypto.inc:COPTS.threads_pthread.c += -DBROKEN_CLANG_ATOMICS # no atomic 64 bit ops

Comments (9)

  1. Takehiko NOZAKI reporter
    diff --git a/crypto/external/apache2/openssl/dist/crypto/threads_pthread.c b/crypto/external/apache2/openssl/dist/crypto/threads_pthread.c
    index 801855c930..a33d259d34 100644
    --- a/crypto/external/apache2/openssl/dist/crypto/threads_pthread.c
    +++ b/crypto/external/apache2/openssl/dist/crypto/threads_pthread.c
    @@ -17,7 +17,8 @@
     # include <atomic.h>
     #endif
    
    -#if defined(__apple_build_version__) && __apple_build_version__ < 6000000
    +#if (defined(__apple_build_version__) && __apple_build_version__ < 6000000) ||
    +    (defined(__NetBSD__) && !defined(__LP64__))
     /*
      * OS/X 10.7 and 10.8 had a weird version of clang which has __ATOMIC_ACQUIRE and
      * __ATOMIC_ACQ_REL but which expects only one parameter for __atomic_is_lock_free()
    

  2. Log in to comment