From 97a975f00d5c721db771697e656884f16e4b0081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E7=B4=AB=E8=8F=9C?= <25471437+13584452567@users.noreply.github.com> Date: Sun, 27 Oct 2024 01:12:38 +0800 Subject: [PATCH 1/2] Add support for LoongArch64 --- ...-boringssl-Add support for loongarch.patch | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 patches/boringssl/0001-boringssl-Add support for loongarch.patch diff --git a/patches/boringssl/0001-boringssl-Add support for loongarch.patch b/patches/boringssl/0001-boringssl-Add support for loongarch.patch new file mode 100644 index 0000000..cc49554 --- /dev/null +++ b/patches/boringssl/0001-boringssl-Add support for loongarch.patch @@ -0,0 +1,29 @@ +diff --git a/crypto/fipsmodule/rand/getrandom_fillin.h b/crypto/fipsmodule/rand/getrandom_fillin.h +index 7c2b62e93487b772990fddc1905f22d4cfaee4a4..9c18fe1eeef6ce09c027abaa5355efab449fce4c 100644 +--- a/crypto/fipsmodule/rand/getrandom_fillin.h ++++ b/crypto/fipsmodule/rand/getrandom_fillin.h +@@ -30,6 +30,8 @@ + #define EXPECTED_NR_getrandom 278 + #elif defined(OPENSSL_ARM) + #define EXPECTED_NR_getrandom 384 ++#elif defined(OPENSSL_LOONG64) ++#define EXPECTED_NR_getrandom 278 + #elif defined(OPENSSL_RISCV64) + #define EXPECTED_NR_getrandom 278 + #endif + + diff --git a/include/openssl/target.h b/include/openssl/target.h +index 7c2b62e93487b772990fddc1905f22d4cfaee4a4..9c18fe1eeef6ce09c027abaa5355efab449fce4c 100644 +--- a/include/openssl/target.h ++++ b/include/openssl/target.h +@@ -34,6 +34,9 @@ + #elif defined(__ARMEL__) || defined(_M_ARM) + #define OPENSSL_32_BIT + #define OPENSSL_ARM ++#elif defined(__loongarch64) ++#define OPENSSL_64_BIT ++#define OPENSSL_LOONG64 + #elif defined(__MIPSEL__) && !defined(__LP64__) + #define OPENSSL_32_BIT + #define OPENSSL_MIPS + \ No newline at end of file From 3b918add4374b33677a7f31e69a7ecc7803f42b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E7=B4=AB=E8=8F=9C?= <25471437+13584452567@users.noreply.github.com> Date: Sun, 27 Oct 2024 01:18:51 +0800 Subject: [PATCH 2/2] Update 0001-boringssl-Add support for loongarch.patch --- ...1-boringssl-Add support for loongarch.patch | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/patches/boringssl/0001-boringssl-Add support for loongarch.patch b/patches/boringssl/0001-boringssl-Add support for loongarch.patch index cc49554..b91a468 100644 --- a/patches/boringssl/0001-boringssl-Add support for loongarch.patch +++ b/patches/boringssl/0001-boringssl-Add support for loongarch.patch @@ -1,5 +1,15 @@ +From 9c18fe1eeef6ce09c027abaa5355efab449fce4c Mon Sep 17 00:00:00 2001 +From: wuruilong +Date: Thu, 4 Jul 2024 12:32:15 +0000 +Subject: [PATCH] Add support for loongarch + +--- + crypto/fipsmodule/rand/getrandom_fillin.h | 2 ++ + include/openssl/target.h | 3 +++ + 2 files changed, 5 insertions(+) + diff --git a/crypto/fipsmodule/rand/getrandom_fillin.h b/crypto/fipsmodule/rand/getrandom_fillin.h -index 7c2b62e93487b772990fddc1905f22d4cfaee4a4..9c18fe1eeef6ce09c027abaa5355efab449fce4c 100644 +index 0f290e9637..3eac6d2f8f 100644 --- a/crypto/fipsmodule/rand/getrandom_fillin.h +++ b/crypto/fipsmodule/rand/getrandom_fillin.h @@ -30,6 +30,8 @@ @@ -11,9 +21,8 @@ index 7c2b62e93487b772990fddc1905f22d4cfaee4a4..9c18fe1eeef6ce09c027abaa5355efab #elif defined(OPENSSL_RISCV64) #define EXPECTED_NR_getrandom 278 #endif - - diff --git a/include/openssl/target.h b/include/openssl/target.h -index 7c2b62e93487b772990fddc1905f22d4cfaee4a4..9c18fe1eeef6ce09c027abaa5355efab449fce4c 100644 +diff --git a/include/openssl/target.h b/include/openssl/target.h +index 2760f52ce8..bc944d2b9c 100644 --- a/include/openssl/target.h +++ b/include/openssl/target.h @@ -34,6 +34,9 @@ @@ -26,4 +35,3 @@ index 7c2b62e93487b772990fddc1905f22d4cfaee4a4..9c18fe1eeef6ce09c027abaa5355efab #elif defined(__MIPSEL__) && !defined(__LP64__) #define OPENSSL_32_BIT #define OPENSSL_MIPS - \ No newline at end of file