summaryrefslogtreecommitdiff
path: root/security/openssl-devel/files
diff options
context:
space:
mode:
authorBernard Spil <brnrd@FreeBSD.org>2021-08-01 10:15:47 +0000
committerBernard Spil <brnrd@FreeBSD.org>2021-08-01 10:34:03 +0000
commit85219598c47f5023fd3aa88b64e6c88493361b0e (patch)
tree1a2a101c9c5497267c6b6e994140da0b323163f1 /security/openssl-devel/files
parentdevel/py-twisted: Update to 21.7.0 (diff)
security/openssl-devel: unbreak on i386 via atomic stub
Submitted by: jbeich
Diffstat (limited to 'security/openssl-devel/files')
-rw-r--r--security/openssl-devel/files/patch-crypto_threads__pthread.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/security/openssl-devel/files/patch-crypto_threads__pthread.c b/security/openssl-devel/files/patch-crypto_threads__pthread.c
new file mode 100644
index 000000000000..fbc67e3e8393
--- /dev/null
+++ b/security/openssl-devel/files/patch-crypto_threads__pthread.c
@@ -0,0 +1,20 @@
+Drop after FreeBSD 13.0/12.2 EOL around 2022-05-30
+
+ld: error: undefined symbol: __atomic_is_lock_free
+>>> referenced by threads_pthread.c
+>>> libfips-lib-threads_pthread.o:(CRYPTO_atomic_or) in archive providers/libfips.a
+>>> referenced by threads_pthread.c
+>>> libfips-lib-threads_pthread.o:(CRYPTO_atomic_load) in archive providers/libfips.a
+
+--- crypto/threads_pthread.c.orig 2021-07-29 14:50:29 UTC
++++ crypto/threads_pthread.c
+@@ -15,6 +15,9 @@
+
+ #if defined(__sun)
+ # include <atomic.h>
++#elif defined(__clang__) && defined(__i386__) && __clang_major__ < 12
++/* Until https://github.com/llvm/llvm-project/commit/00530dee5d12 */
++#define __atomic_is_lock_free(size, ptr) ((void)(ptr), size <= sizeof(void *))
+ #endif
+
+ #if defined(OPENSSL_THREADS) && !defined(CRYPTO_TDEBUG) && !defined(OPENSSL_SYS_WINDOWS)