!15 add loongarch support for abseil-cpp
From: @zhangwenlong01 Reviewed-by: @yanan-rock Signed-off-by: @yanan-rock
This commit is contained in:
commit
d45db80315
34
0001-add-loongarch-suopport-for-abseil-cpp.patch
Normal file
34
0001-add-loongarch-suopport-for-abseil-cpp.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From a8c98703c8b7b1fc3ae104dce0bfd05dc92a1d7d Mon Sep 17 00:00:00 2001
|
||||
From: Wenlong Zhang <zhangwenlong@loongson.cn> Huang Yang <huangyang@loongson.cn>
|
||||
Date: Mon, 14 Nov 2022 11:48:49 +0000
|
||||
Subject: [PATCH] add loongarch suopport for abseil-cpp
|
||||
|
||||
Signed-off-by: Wenlong Zhang <zhangwenlong@loongson.cn>
|
||||
---
|
||||
absl/base/internal/direct_mmap.h | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h
|
||||
index e492bb0..d11a64e 100644
|
||||
--- a/absl/base/internal/direct_mmap.h
|
||||
+++ b/absl/base/internal/direct_mmap.h
|
||||
@@ -79,6 +79,7 @@ inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd,
|
||||
(defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) || \
|
||||
(defined(__PPC__) && !defined(__PPC64__)) || \
|
||||
(defined(__riscv) && __riscv_xlen == 32) || \
|
||||
+ defined(__loongarch64) || \
|
||||
(defined(__s390__) && !defined(__s390x__)) || \
|
||||
(defined(__sparc__) && !defined(__arch64__))
|
||||
// On these architectures, implement mmap with mmap2.
|
||||
@@ -100,7 +101,7 @@ inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd,
|
||||
return __mmap2(start, length, prot, flags, fd, offset / pagesize);
|
||||
#else
|
||||
return reinterpret_cast<void*>(
|
||||
- syscall(SYS_mmap2, start, length, prot, flags, fd,
|
||||
+ syscall(SYS_mmap, start, length, prot, flags, fd,
|
||||
static_cast<off_t>(offset / pagesize)));
|
||||
#endif
|
||||
#elif defined(__s390x__)
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
Name: abseil-cpp
|
||||
Version: 20220623.1
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: C++ Common Libraries
|
||||
|
||||
License: ASL 2.0
|
||||
@ -15,6 +15,9 @@ Source0: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}-
|
||||
|
||||
Patch0: backport-Do-not-leak-maes-msse4.1-into-pkgconfig.patch
|
||||
Patch1: abseil-cpp-20210324.2-sw.patch
|
||||
%ifarch loongarch64
|
||||
Patch100: 0001-add-loongarch-suopport-for-abseil-cpp.patch
|
||||
%endif
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
@ -64,6 +67,9 @@ Development headers for %{name}
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
|
||||
%changelog
|
||||
* Mon Nov 14 2022 Wenlong Zhang <zhangwenlong@loongson.cn> - 20220623.1-3
|
||||
- add loongarch support for abseil-cpp
|
||||
|
||||
* Fri Nov 11 2022 wuzx<wuzx1226@qq.com> - 20220623.1-2
|
||||
- Type:feature
|
||||
- CVE:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user