Skip to content

Commit b46a219

Browse files
committed
deps: enable OpenSSL asm support for riscv64
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: nodejs/build#4099 Signed-off-by: Jamie Magee <jamie.magee@gmail.com>
1 parent 5922197 commit b46a219

223 files changed

Lines changed: 122969 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

deps/openssl/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Here is a list of supported architectures for use of ASM in OpenSSL.
5454
| linux | ppc64(*1) | linux-ppc64le | o |
5555
| linux | s390 | linux32-s390x | o |
5656
| linux | s390x | linux64-s390x | o |
57+
| linux | riscv64 | linux64-riscv64 | - |
5758
| mac | ia32 | darwin-i386-cc | - |
5859
| mac | x64 | darwin64-x86-cc | o |
5960
| win | ia32 | VC-WIN32 | - |

deps/openssl/config/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ ASM_ARCHS = aix64-gcc-as BSD-x86 BSD-x86_64 \
1313
darwin64-x86_64-cc darwin-i386-cc darwin64-arm64-cc linux-aarch64 \
1414
linux-armv4 linux-elf linux-x86_64 \
1515
linux-ppc64le linux32-s390x linux64-s390x linux64-mips64\
16+
linux64-riscv64 \
1617
solaris-x86-gcc solaris64-x86_64-gcc VC-WIN64A VC-WIN32
1718

18-
NO_ASM_ARCHS = VC-WIN64-ARM linux64-riscv64 linux64-loongarch64
19+
NO_ASM_ARCHS = VC-WIN64-ARM linux64-loongarch64
1920

2021
CC = gcc
2122
FAKE_GCC = ../config/fake_gcc.pl

0 commit comments

Comments
 (0)