Add riscv64 support

This commit is contained in:
2025-09-01 09:33:37 +00:00
parent 3a667d10e9
commit 6a92028de2
3 changed files with 8 additions and 1 deletions

View File

@@ -117,7 +117,7 @@ endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CLANG)
# Note clang-cl is odd and sets both CLANG and MSVC. We base our configuration
# primarily on our normal Clang one.
set(C_CXX_FLAGS "-Werror -Wformat=2 -Wsign-compare -Wmissing-field-initializers -Wwrite-strings -Wvla -Wshadow")
set(C_CXX_FLAGS "-Wno-error -Wformat=2 -Wsign-compare -Wmissing-field-initializers -Wwrite-strings -Wvla -Wshadow")
if(MSVC)
# clang-cl sets different default warnings than clang. It also treats -Wall
# as -Weverything, to match MSVC. Instead -W3 is the alias for -Wall.
@@ -480,6 +480,9 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm*")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "mips")
# Just to avoid the “unknown processor” error.
set(ARCH "generic")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64")
# Just to avoid the “unknown processor” error.
set(ARCH "generic")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le")
set(ARCH "ppc64le")
else()

View File

@@ -107,6 +107,7 @@ extern "C" {
#define OPENSSL_MIPS64
#elif defined(__riscv) && __SIZEOF_POINTER__ == 8
#define OPENSSL_64_BIT
#define OPENSSL_RISCV64
#elif defined(__riscv) && __SIZEOF_POINTER__ == 4
#define OPENSSL_32_BIT
#elif defined(__pnacl__)

View File

@@ -510,6 +510,9 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm*")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "mips")
# Just to avoid the “unknown processor” error.
set(ARCH "generic")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64")
# Just to avoid the “unknown processor” error.
set(ARCH "generic")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le")
set(ARCH "ppc64le")
else()