pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/security/openssl



Module Name:    pkgsrc
Committed By:   schmonz
Date:           Wed Dec 27 14:41:31 UTC 2023

Modified Files:
        pkgsrc/security/openssl: Makefile

Log Message:
openssl: on NetBSD arches without atomic 64-bit ops, use builtin fallbacks.

Fixes these errors on NetBSD/macppc (and presumably the other listed platforms):

ld: ./libcrypto.so: undefined reference to `__atomic_load_8'
ld: ./libcrypto.so: undefined reference to `__atomic_fetch_or_8'
ld: ./libcrypto.so: undefined reference to `__atomic_is_lock_free'

(suggested by riastradh@)


To generate a diff of this commit:
cvs rdiff -u -r1.294 -r1.295 pkgsrc/security/openssl/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/security/openssl/Makefile
diff -u pkgsrc/security/openssl/Makefile:1.294 pkgsrc/security/openssl/Makefile:1.295
--- pkgsrc/security/openssl/Makefile:1.294      Sun Nov  5 19:37:19 2023
+++ pkgsrc/security/openssl/Makefile    Wed Dec 27 14:41:31 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.294 2023/11/05 19:37:19 nia Exp $
+# $NetBSD: Makefile,v 1.295 2023/12/27 14:41:31 schmonz Exp $
 
 # Remember to upload-distfiles when updating OpenSSL -- otherwise it
 # is not possible for users who have bootstrapped without OpenSSL
@@ -30,6 +30,22 @@ MAKE_FLAGS+=         MANDIR=${PREFIX}/${PKGMAND
 
 .include "../../mk/bsd.prefs.mk"
 
+.if ${OPSYS} == "NetBSD" && \
+       ((${MACHINE_ARCH} == "arm") || \
+       (${MACHINE_ARCH} == "hppa") || \
+       (${MACHINE_ARCH} == "i386") || \
+       (${MACHINE_ARCH} == "m68k") || \
+       (${MACHINE_ARCH} == "mips") || \
+       (${MACHINE_ARCH} == "powerpc") || \
+       (${MACHINE_ARCH} == "riscv32") || \
+       (${MACHINE_ARCH} == "sh3") || \
+       (${MACHINE_ARCH} == "sparc") || \
+       (${MACHINE_ARCH} == "vax"))
+# Use OpenSSL's built-in fallbacks (not actually clang-specific)
+# see src/crypto/external/bsd/openssl/lib/libcrypto/arch/*/crypto.inc
+CFLAGS+=               -DBROKEN_CLANG_ATOMICS  # no atomic 64 bit ops
+.endif
+
 .if ${MACHINE_PLATFORM:MDarwin-[0-8].*-powerpc}
 # No {get,make,set}context support before Darwin 9
 CONFIGURE_ARGS+=       no-async



Home | Main Index | Thread Index | Old Index