Skip to content

Commit 77a251a

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 <[email protected]>
1 parent b2248fd commit 77a251a

288 files changed

Lines changed: 138392 additions & 65 deletions

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

deps/openssl/config/archs/BSD-x86/asm/crypto/buildinf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
#define PLATFORM "platform: BSD-x86"
14-
#define DATE "built on: Tue Apr 7 19:05:06 2026 UTC"
14+
#define DATE "built on: Wed Apr 22 16:21:03 2026 UTC"
1515

1616
/*
1717
* Generate compiler_flags as an array of individual characters. This is a

deps/openssl/config/archs/BSD-x86/asm_avx2/crypto/buildinf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
#define PLATFORM "platform: BSD-x86"
14-
#define DATE "built on: Tue Apr 7 19:05:23 2026 UTC"
14+
#define DATE "built on: Wed Apr 22 16:21:20 2026 UTC"
1515

1616
/*
1717
* Generate compiler_flags as an array of individual characters. This is a

deps/openssl/config/archs/BSD-x86/no-asm/crypto/buildinf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
#define PLATFORM "platform: BSD-x86"
14-
#define DATE "built on: Tue Apr 7 19:05:40 2026 UTC"
14+
#define DATE "built on: Wed Apr 22 16:21:38 2026 UTC"
1515

1616
/*
1717
* Generate compiler_flags as an array of individual characters. This is a

deps/openssl/config/archs/BSD-x86_64/asm/crypto/buildinf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
#define PLATFORM "platform: BSD-x86_64"
14-
#define DATE "built on: Tue Apr 7 19:05:56 2026 UTC"
14+
#define DATE "built on: Wed Apr 22 16:21:54 2026 UTC"
1515

1616
/*
1717
* Generate compiler_flags as an array of individual characters. This is a

deps/openssl/config/archs/BSD-x86_64/asm_avx2/crypto/buildinf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
#define PLATFORM "platform: BSD-x86_64"
14-
#define DATE "built on: Tue Apr 7 19:06:20 2026 UTC"
14+
#define DATE "built on: Wed Apr 22 16:22:19 2026 UTC"
1515

1616
/*
1717
* Generate compiler_flags as an array of individual characters. This is a

deps/openssl/config/archs/BSD-x86_64/no-asm/crypto/buildinf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
#define PLATFORM "platform: BSD-x86_64"
14-
#define DATE "built on: Tue Apr 7 19:06:40 2026 UTC"
14+
#define DATE "built on: Wed Apr 22 16:22:39 2026 UTC"
1515

1616
/*
1717
* Generate compiler_flags as an array of individual characters. This is a

deps/openssl/config/archs/VC-WIN32/asm/configdata.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ our %target = (
316316
"LDFLAGS" => "/nologo /debug",
317317
"MT" => "mt",
318318
"MTFLAGS" => "-nologo",
319-
"RANLIB" => "CODE(0x55f511b27e00)",
319+
"RANLIB" => "CODE(0x5f4c1a345b10)",
320320
"RC" => "rc",
321321
"_conf_fname_int" => [
322322
"Configurations/00-base-templates.conf",

deps/openssl/config/archs/VC-WIN32/asm/crypto/buildinf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
#define PLATFORM "platform: "
14-
#define DATE "built on: Tue Apr 7 19:19:01 2026 UTC"
14+
#define DATE "built on: Wed Apr 22 16:36:03 2026 UTC"
1515

1616
/*
1717
* Generate compiler_flags as an array of individual characters. This is a

0 commit comments

Comments
 (0)