Porting loong64 patch from BoringSSL

This commit is contained in:
Rewnosor 2024-09-05 14:45:52 +08:00 committed by openkylin-cibot
parent 6d2f602e02
commit a8d504dc3f
3 changed files with 44 additions and 0 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
android-platform-external-boringssl (14.0.0+r11-ok2) nile; urgency=medium
* 移植BoringSSL的龙芯补丁到本项目.
- https://github.com/google/boringssl/pull/31/files
-- liwenjun <liwenjun@kylinos.cn> Thu, 05 Sep 2024 14:42:52 +0800
android-platform-external-boringssl (14.0.0+r11-ok1) nile; urgency=medium
* Build for openKylin.

View File

@ -0,0 +1,36 @@
From: Rewnosor <liwenjun@kylinos.cn>
Date: Thu, 5 Sep 2024 14:45:52 +0800
Subject: Porting loong64 patch from BoringSSL
---
src/crypto/fipsmodule/rand/getrandom_fillin.h | 2 ++
src/include/openssl/base.h | 3 +++
2 files changed, 5 insertions(+)
diff --git a/src/crypto/fipsmodule/rand/getrandom_fillin.h b/src/crypto/fipsmodule/rand/getrandom_fillin.h
index c0dea35..5b35e95 100644
--- a/src/crypto/fipsmodule/rand/getrandom_fillin.h
+++ b/src/crypto/fipsmodule/rand/getrandom_fillin.h
@@ -32,6 +32,8 @@
#define EXPECTED_NR_getrandom 384
#elif defined(OPENSSL_PPC64LE)
#define EXPECTED_NR_getrandom 359
+#elif defined(OPENSSL_LOONG64)
+#define EXPECTED_NR_getrandom 278
#elif defined(OPENSSL_RISCV64)
#define EXPECTED_NR_getrandom 278
#endif
diff --git a/src/include/openssl/base.h b/src/include/openssl/base.h
index 93de13d..0ec3f20 100644
--- a/src/include/openssl/base.h
+++ b/src/include/openssl/base.h
@@ -99,6 +99,9 @@ extern "C" {
#elif (defined(__PPC64__) || defined(__powerpc64__)) && defined(_LITTLE_ENDIAN)
#define OPENSSL_64_BIT
#define OPENSSL_PPC64LE
+#elif defined(__loongarch64)
+#define OPENSSL_64_BIT
+#define OPENSSL_LOONG64
#elif defined(__MIPSEL__) && !defined(__LP64__)
#define OPENSSL_32_BIT
#define OPENSSL_MIPS

View File

@ -2,3 +2,4 @@
02-sources-mk.patch
03-Disable-failing-test.patch
04-Revert-Remove-support-for-ppc64le.patch
0005-Porting-loong64-patch-from-BoringSSL.patch