From 9cbc371c8af751c177f8242a306678da49b3adab Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Sat, 24 Jun 2023 13:52:08 -0400 Subject: [PATCH] libcrypto: build nistp* on all little-endian 64-bit targets libcrypto intends to provide these routines on little-endian 64-bit targets. This was previously done by including them in the ASM_aarch64 and ASM_amd64 blocks in the Makefile, but this excluded powerpc64le and riscv64. Reported by: ci.freebsd.org Reviewed by: jrtc27 Fixes: b077aed33b7b ("Merge OpenSSL 3.0.9") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40749 --- secure/lib/libcrypto/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index a1f519431f63..28258e796984 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -215,11 +215,13 @@ SRCS+= ec_pmeth.c ec_print.c ecdh_kdf.c ecdh_ossl.c ecdsa_ossl.c ecdsa_sign.c SRCS+= ecdsa_vrf.c eck_prn.c ecp_mont.c ecp_nist.c SRCS+= ecp_oct.c ecp_smpl.c ecx_backend.c ecx_key.c ecx_meth.c eddsa.c SRCS+= f_generic.c f_impl32.c f_impl64.c scalar.c -.if defined(ASM_aarch64) +# see OPENSSL_NO_EC_NISTP_64_GCC_128 in configuration.h +.if ${MACHINE_ABI:Mlittle-endian} && ${MACHINE_ABI:Mlong64} SRCS+= ecp_nistp224.c ecp_nistp256.c ecp_nistp521.c ecp_nistputil.c +.endif +.if defined(ASM_aarch64) SRCS+= ecp_nistz256-armv8.S ecp_nistz256.c .elif defined(ASM_amd64) -SRCS+= ecp_nistp224.c ecp_nistp256.c ecp_nistp521.c ecp_nistputil.c SRCS+= ecp_nistz256-x86_64.S ecp_nistz256.c x25519-x86_64.S .elif defined(ASM_arm) SRCS+= ecp_nistz256-armv4.S ecp_nistz256.c