mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
Move linux64-riscv64 from NO_ASM_ARCHS to ASM_ARCHS in the OpenSSL config Makefile and regenerate the configuration. This adds asm/ and asm_avx2/ config variants alongside the existing no-asm/ variant. When riscv64 was first added to the OpenSSL config in 2021 (#40063), OpenSSL had no RISC-V assembly support. OpenSSL 3.5.x now ships 17 perlasm generators covering AES (zvkned, zvkb, zkn), SHA-256/512 (zvknha, zvknhb), GHASH/GCM (zvkg, zvbc), ChaCha (v, zbb), SM3 (zvksh), SM4 (zvksed), and CPUID detection. Runtime capability detection via riscvcap.c and the Linux hwprobe syscall ensures safe fallback to generic C code on hardware without these extensions. Also add riscv64 entries to the six asm gypi selector files: openssl_asm.gypi, openssl_asm_avx2.gypi, openssl-cl_asm.gypi, openssl-cl_asm_avx2.gypi, openssl-fips_asm.gypi, and openssl-fips_asm_avx2.gypi. Refs: https://github.com/nodejs/build/issues/4099 Signed-off-by: Jamie Magee <jamie.magee@gmail.com> PR-URL: https://github.com/nodejs/node/pull/62606 Reviewed-By: Stewart X Addison <sxa@redhat.com> Reviewed-By: Richard Lau <richard.lau@ibm.com>
56 lines
2.5 KiB
C
56 lines
2.5 KiB
C
#undef OPENSSL_LINUX
|
|
#if defined(__linux) && !defined(__ANDROID__)
|
|
# define OPENSSL_LINUX 1
|
|
#endif
|
|
|
|
#if defined(OPENSSL_LINUX) && defined(__i386__)
|
|
# include "./archs/linux-elf/asm/include/openssl/cmp.h"
|
|
#elif defined(OPENSSL_LINUX) && defined(__ILP32__)
|
|
# include "./archs/linux-x32/asm/include/openssl/cmp.h"
|
|
#elif defined(OPENSSL_LINUX) && defined(__x86_64__)
|
|
# include "./archs/linux-x86_64/asm/include/openssl/cmp.h"
|
|
#elif defined(OPENSSL_LINUX) && defined(__arm__)
|
|
# include "./archs/linux-armv4/asm/include/openssl/cmp.h"
|
|
#elif defined(OPENSSL_LINUX) && defined(__aarch64__)
|
|
# include "./archs/linux-aarch64/asm/include/openssl/cmp.h"
|
|
#elif defined(OPENSSL_LINUX) && defined(__riscv) && (__riscv_xlen == 64)
|
|
# include "./archs/linux64-riscv64/asm/include/openssl/cmp.h"
|
|
#elif defined(__APPLE__) && defined(__MACH__) && defined(__i386__)
|
|
# include "./archs/darwin-i386-cc/asm/include/openssl/cmp.h"
|
|
#elif defined(__APPLE__) && defined(__MACH__) && defined(__x86_64__)
|
|
# include "./archs/darwin64-x86_64-cc/asm/include/openssl/cmp.h"
|
|
#elif defined(__APPLE__) && defined(__MACH__) && defined(__arm64__)
|
|
# include "./archs/darwin64-arm64-cc/asm/include/openssl/cmp.h"
|
|
#elif defined(_WIN32) && defined(_M_IX86)
|
|
# include "./archs/VC-WIN32/asm/include/openssl/cmp.h"
|
|
#elif defined(_WIN32) && defined(_M_X64)
|
|
# include "./archs/VC-WIN64A/asm/include/openssl/cmp.h"
|
|
#elif (defined(__FreeBSD__) || defined(__OpenBSD__)) && defined(__i386__)
|
|
# include "./archs/BSD-x86/asm/include/openssl/cmp.h"
|
|
#elif (defined(__FreeBSD__) || defined(__OpenBSD__)) && defined(__x86_64__)
|
|
# include "./archs/BSD-x86_64/asm/include/openssl/cmp.h"
|
|
#elif defined(__sun) && defined(__i386__)
|
|
# include "./archs/solaris-x86-gcc/asm/include/openssl/cmp.h"
|
|
#elif defined(__sun) && defined(__x86_64__)
|
|
# include "./archs/solaris64-x86_64-gcc/asm/include/openssl/cmp.h"
|
|
#elif defined(OPENSSL_LINUX) && defined(__PPC64__) && defined(L_ENDIAN)
|
|
# include "./archs/linux-ppc64le/asm/include/openssl/cmp.h"
|
|
#elif defined(_AIX) && defined(_ARCH_PPC64)
|
|
# include "./archs/aix64-gcc-as/asm/include/openssl/cmp.h"
|
|
#elif defined(OPENSSL_LINUX) && defined(__s390x__)
|
|
# include "./archs/linux64-s390x/asm/include/openssl/cmp.h"
|
|
#elif defined(OPENSSL_LINUX) && defined(__s390__)
|
|
# include "./archs/linux32-s390x/asm/include/openssl/cmp.h"
|
|
#else
|
|
# include "./archs/linux-elf/asm/include/openssl/cmp.h"
|
|
#endif
|
|
|
|
/* GOST is not included in all platform */
|
|
#ifndef OPENSSL_NO_GOST
|
|
# define OPENSSL_NO_GOST
|
|
#endif
|
|
/* HW_PADLOCK is not included in all platform */
|
|
#ifndef OPENSSL_NO_HW_PADLOCK
|
|
# define OPENSSL_NO_HW_PADLOCK
|
|
#endif
|