Compare commits
10 Commits
04d28a43b4
...
d9a3fdf81a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9a3fdf81a | ||
|
|
7a7aa7092d | ||
|
|
ce75f0e4db | ||
|
|
fbd338edac | ||
|
|
523e673fbf | ||
|
|
9b597d8a72 | ||
|
|
82d6cf63fb | ||
|
|
c7b332bcb1 | ||
|
|
7789e38ec3 | ||
|
|
bfd018110f |
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
|
||||||
|
|
||||||
12
abseil-cpp-20210324.2-sw.patch
Executable file
12
abseil-cpp-20210324.2-sw.patch
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
diff -Naur abseil-cpp-20210324.2.org/absl/debugging/internal/examine_stack.cc abseil-cpp-20210324.2.sw/absl/debugging/internal/examine_stack.cc
|
||||||
|
--- abseil-cpp-20210324.2.org/absl/debugging/internal/examine_stack.cc 2022-03-10 01:13:54.492357080 +0000
|
||||||
|
+++ abseil-cpp-20210324.2.sw/absl/debugging/internal/examine_stack.cc 2022-03-10 01:15:26.202357080 +0000
|
||||||
|
@@ -46,7 +46,7 @@
|
||||||
|
ucontext_t* context = reinterpret_cast<ucontext_t*>(vuc);
|
||||||
|
#if defined(__aarch64__)
|
||||||
|
return reinterpret_cast<void*>(context->uc_mcontext.pc);
|
||||||
|
-#elif defined(__alpha__)
|
||||||
|
+#elif defined(__alpha__) || defined(__sw_64__)
|
||||||
|
return reinterpret_cast<void*>(context->uc_mcontext.sc_pc);
|
||||||
|
#elif defined(__arm__)
|
||||||
|
return reinterpret_cast<void*>(context->uc_mcontext.arm_pc);
|
||||||
BIN
abseil-cpp-20220623.1.tar.gz
Normal file
BIN
abseil-cpp-20220623.1.tar.gz
Normal file
Binary file not shown.
94
abseil-cpp.spec
Normal file
94
abseil-cpp.spec
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
# Force out of source build
|
||||||
|
%undefine __cmake_in_source_build
|
||||||
|
|
||||||
|
# Installed library version
|
||||||
|
%global lib_version 2206.0.0
|
||||||
|
|
||||||
|
Name: abseil-cpp
|
||||||
|
Version: 20220623.1
|
||||||
|
Release: 5
|
||||||
|
Summary: C++ Common Libraries
|
||||||
|
|
||||||
|
License: ASL 2.0
|
||||||
|
URL: https://abseil.io
|
||||||
|
Source0: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
Patch0: backport-Do-not-leak-maes-msse4.1-into-pkgconfig.patch
|
||||||
|
Patch1: abseil-cpp-20210324.2-sw.patch
|
||||||
|
Patch2: backport-Add-missing-include-for-std-unique_ptr.patch
|
||||||
|
|
||||||
|
%ifarch loongarch64
|
||||||
|
Patch100: 0001-add-loongarch-suopport-for-abseil-cpp.patch
|
||||||
|
%endif
|
||||||
|
|
||||||
|
BuildRequires: cmake
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: make
|
||||||
|
|
||||||
|
%description
|
||||||
|
Abseil is an open-source collection of C++ library code designed to augment
|
||||||
|
the C++ standard library. The Abseil library code is collected from
|
||||||
|
Google's own C++ code base, has been extensively tested and used in
|
||||||
|
production, and is the same code we depend on in our daily coding lives.
|
||||||
|
|
||||||
|
In some cases, Abseil provides pieces missing from the C++ standard; in
|
||||||
|
others, Abseil provides alternatives to the standard for special needs we've
|
||||||
|
found through usage in the Google code base. We denote those cases clearly
|
||||||
|
within the library code we provide you.
|
||||||
|
|
||||||
|
Abseil is not meant to be a competitor to the standard library; we've just
|
||||||
|
found that many of these utilities serve a purpose within our code base,
|
||||||
|
and we now want to provide those resources to the C++ community as a whole.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for %{name}
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
Conflicts: grpc < 1.31.0-5
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
Development headers for %{name}
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%cmake
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license LICENSE
|
||||||
|
%doc FAQ.md README.md UPGRADES.md
|
||||||
|
%{_libdir}/libabsl_*.so.%{lib_version}
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{_includedir}/absl
|
||||||
|
%{_libdir}/cmake/absl
|
||||||
|
%{_libdir}/libabsl_*.so
|
||||||
|
%{_libdir}/pkgconfig/*.pc
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue Apr 16 2024 xinghe <xinghe2@h-partners.com> - 20220623.1-5
|
||||||
|
- Type:bugfix
|
||||||
|
- CVE:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:Add missing include for std::unique_ptr
|
||||||
|
|
||||||
|
* 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
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:Add sw64 architecture
|
||||||
|
|
||||||
|
* Wed Nov 02 2022 xinghe <xinghe2@h-partners.com> - 20220623.1-1
|
||||||
|
- Type:enhancement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC: update to 20220623.1
|
||||||
|
|
||||||
|
* Wed Jun 23 2021 gaihuiying <gaihuiying1@huawei.com> - 20210324.2-1
|
||||||
|
- package init
|
||||||
4
abseil-cpp.yaml
Normal file
4
abseil-cpp.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: abseil/abseil-cpp
|
||||||
|
tag_prefix: ^v
|
||||||
|
separator: .
|
||||||
26
backport-Add-missing-include-for-std-unique_ptr.patch
Normal file
26
backport-Add-missing-include-for-std-unique_ptr.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From 701185dbce17a2f49334027ca3cb5788a5d06c6d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Abseil Team <absl-team@google.com>
|
||||||
|
Date: Fri, 22 Jul 2022 12:41:32 -0700
|
||||||
|
Subject: [PATCH] Add missing include for std::unique_ptr
|
||||||
|
|
||||||
|
PiperOrigin-RevId: 462681925
|
||||||
|
Change-Id: Ic5610cb4124b7f60a00817ca2f1d52674b27c168
|
||||||
|
|
||||||
|
Conflict: NA
|
||||||
|
Reference: https://github.com/abseil/abseil-cpp/commit/701185dbce17a2f49334027ca3cb5788a5d06c6d
|
||||||
|
---
|
||||||
|
absl/status/internal/status_internal.h | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/absl/status/internal/status_internal.h b/absl/status/internal/status_internal.h
|
||||||
|
index 19a4a7aaa09..873eb5c245d 100644
|
||||||
|
--- a/absl/status/internal/status_internal.h
|
||||||
|
+++ b/absl/status/internal/status_internal.h
|
||||||
|
@@ -14,6 +14,7 @@
|
||||||
|
#ifndef ABSL_STATUS_INTERNAL_STATUS_INTERNAL_H_
|
||||||
|
#define ABSL_STATUS_INTERNAL_STATUS_INTERNAL_H_
|
||||||
|
|
||||||
|
+#include <memory>
|
||||||
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
26
backport-Do-not-leak-maes-msse4.1-into-pkgconfig.patch
Normal file
26
backport-Do-not-leak-maes-msse4.1-into-pkgconfig.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From 09e96049995584c3489e4bd1467313e3e85af99c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bruno Pitrus <brunopitrus@hotmail.com>
|
||||||
|
Date: Mon, 11 Jul 2022 18:27:39 +0200
|
||||||
|
Subject: [PATCH] Do not leak -maes -msse4.1 into pkgconfig
|
||||||
|
|
||||||
|
Conflict: NA
|
||||||
|
Reference: https://github.com/abseil/abseil-cpp/commit/09e96049995584c3489e4bd1467313e3e85af99c
|
||||||
|
---
|
||||||
|
CMake/AbseilHelpers.cmake | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake
|
||||||
|
index ebe9ddc8..9cd87c51 100644
|
||||||
|
--- a/CMake/AbseilHelpers.cmake
|
||||||
|
+++ b/CMake/AbseilHelpers.cmake
|
||||||
|
@@ -166,6 +166,8 @@ function(absl_cc_library)
|
||||||
|
set(PC_CFLAGS "${PC_CFLAGS} ${cflag}")
|
||||||
|
elseif(${cflag} MATCHES "^(-W|/w[1234eo])")
|
||||||
|
# Don't impose our warnings on others.
|
||||||
|
+ elseif(${cflag} MATCHES "^-m")
|
||||||
|
+ # Don't impose CPU instruction requirements on others, as the code performs feature detection on runtime.
|
||||||
|
else()
|
||||||
|
set(PC_CFLAGS "${PC_CFLAGS} ${cflag}")
|
||||||
|
endif()
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
Loading…
x
Reference in New Issue
Block a user