!8 [sync] PR-5: add loongarch support for double-conversion

From: @openeuler-sync-bot 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
This commit is contained in:
openeuler-ci-bot 2023-01-09 01:34:27 +00:00 committed by Gitee
commit 78d69f9b0f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 30 additions and 2 deletions

View File

@ -0,0 +1,24 @@
From e36eb24820f9349591e20c57944ab8f713ccc9f7 Mon Sep 17 00:00:00 2001
From: Sun Haiyong <sunhaiyong@loongson.cn>
Date: Wed, 22 Dec 2021 15:32:37 +0800
Subject: [PATCH] Add loongarch support.
Signed-off-by: Wenlong Zhang <zhangwenlong@loongson.cn>
---
double-conversion/utils.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/double-conversion/utils.h b/double-conversion/utils.h
index 4328344..72f1df8 100644
--- a/double-conversion/utils.h
+++ b/double-conversion/utils.h
@@ -93,6 +93,7 @@ int main(int argc, char** argv) {
#if defined(_M_X64) || defined(__x86_64__) || \
defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \
defined(__hppa__) || defined(__ia64__) || \
+ defined(__loongarch64) || \
defined(__mips__) || \
defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
--
2.30.0

View File

@ -3,11 +3,12 @@
Summary: Library providing binary-decimal and decimal-binary routines for IEEE doubles
Name: double-conversion
Version: 3.1.5
Release: 1
Release: 2
License: BSD
URL: https://github.com/google/double-conversion
Source0: https://github.com/google/double-conversion/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: gcc gcc-c++ cmake
Patch1: double-conversion-3.1.5-add-loongarch-support.patch
%description
Provides binary-decimal and decimal-binary routines for IEEE doubles.
@ -34,7 +35,7 @@ Requires: %{name}-devel%{?_isa} = %{version}-%{release}
Static %{name} library.
%prep
%setup -q
%autosetup -n %{name}-%{version} -p1
%build
mkdir -p build-shared
@ -84,5 +85,8 @@ popd
%endif
%changelog
* Tue Nov 8 2022 WenlongZhang <zhangwenlong@loongson.cn> - 3.1.5-2
- Add loongarch support.
* Thu Jul 23 2020 chengzihan <chengzihan2@huawei.com> - 3.1.5-1
- Package init