From 062bf11cac63b7fad923eb031ffa32a1c3434227 Mon Sep 17 00:00:00 2001 From: zhaozhen Date: Tue, 15 Nov 2022 19:34:13 +0800 Subject: [PATCH] Add loongarch support Signed-off-by: herengui --- fix-add-loongarch64-target.patch | 29 +++++++++++++++++++++++++++++ openssl.spec | 9 ++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 fix-add-loongarch64-target.patch diff --git a/fix-add-loongarch64-target.patch b/fix-add-loongarch64-target.patch new file mode 100644 index 0000000..577acea --- /dev/null +++ b/fix-add-loongarch64-target.patch @@ -0,0 +1,29 @@ +From 5fd4cc31c0eba0813a005d3559afc1b42df8ee32 Mon Sep 17 00:00:00 2001 +From: Shi Pujin +Date: Wed, 16 Feb 2022 10:53:56 +0800 +Subject: [PATCH] Add loongarch64 target + +--- + Configurations/10-main.conf | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf +index b024cd4..c575e6b 100644 +--- a/Configurations/10-main.conf ++++ b/Configurations/10-main.conf +@@ -763,6 +763,13 @@ my %targets = ( + perlasm_scheme => "linux64", + }, + ++ # loongarch64 below refers to contemporary LOONGARCH Architecture ++ # specifications, ++ "linux-loongarch64" => { ++ inherit_from => [ "linux-generic64"], ++ perlasm_scheme => "linux64", ++ }, ++ + #### IA-32 targets... + #### These two targets are a bit aged and are to be used on older Linux + #### machines where gcc doesn't understand -m32 and -m64 +-- +2.27.0 diff --git a/openssl.spec b/openssl.spec index 92c9fad..dce1ef5 100644 --- a/openssl.spec +++ b/openssl.spec @@ -2,7 +2,7 @@ Name: openssl Epoch: 1 Version: 1.1.1m -Release: 18 +Release: 19 Summary: Cryptography and SSL/TLS Toolkit License: OpenSSL and SSLeay URL: https://www.openssl.org/ @@ -58,6 +58,7 @@ Patch47: backport-Ensure-that-EXFLAG_INVALID_POLICY-is-checked-even-in.patch Patch48: backport-Fix-documentation-of-X509_VERIFY_PARAM_add0_policy.patch Patch49: backport-Add-a-Certificate-Policies-Test.patch Patch50: backport-Generate-some-certificates-with-the-certificatePolic.patch +Patch51: fix-add-loongarch64-target.patch BuildRequires: gcc perl make lksctp-tools-devel coreutils util-linux zlib-devel Requires: coreutils %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} @@ -118,6 +119,9 @@ sslarch=%{_os}-%{_target_cpu} %ifarch x86_64 aarch64 sslflags=enable-ec_nistp_64_gcc_128 %endif +%ifarch loongarch64 +sslflags="--libdir=%{_libdir}" +%endif RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wa,--noexecstack -DPURIFY $RPM_LD_FLAGS" ./Configure \ @@ -260,6 +264,9 @@ make test || : %ldconfig_scriptlets libs %changelog +* Sun Apr 23 2023 herengui - 1:1.1.1m-19 +- Add loongarch support + * Tue Apr 4 2023 wangcheng - 1:1.1.1m-18 - fix some CVEs -- Gitee