dev-cpp/abseil-cpp: Add from Gentoo

It's from Gentoo commit 33ba9e298ae98dc83984d219d63391b1c5d1fcc0.
This commit is contained in:
Krzesimir Nowak 2024-07-04 13:07:19 +02:00 committed by Mathieu Tortuyaux
parent 3441e88e4d
commit 73e8c91227
No known key found for this signature in database
GPG Key ID: AC5CCFB52545D9B8
14 changed files with 623 additions and 0 deletions

View File

@ -0,0 +1,9 @@
DIST abseil-cpp-20211102.0.tar.gz 1884080 BLAKE2B a148f3b7cc9516fbeacc25116032a956bfa3cce61b4294c226e826e1171d24c043ab199757a11fae3fec0bc307b2222773a6b4f4563b289f7565b0ce4f72318a SHA512 fed68aa434c02ec6faa9d1c81f1ad35b60ec024b44957e2e0ac31e6075e385c06a3e1b616afeb4bb7c2413191fd7827d82e1f9f0796b52ed21fb2c41dd9031cf
DIST abseil-cpp-20220623.1.tar.gz 1957483 BLAKE2B 5bcf60b5a55882bcb78c7095a9892f6d1e5819fb116e325a8299fb22780ab009f0e1d92d5d8aca5ae0d4acc6d60e620e3357a24e389059f6e75d94f1cbdc1ced SHA512 ab4fccd9a2bfa0c5ad4b56c8e8f8b7ec7a8eca8b6cc6959802acadd1da785e1feb078c6ac621808cd699c82717a9e637dc426d94b70a8db7f2a807059d41cbc2
DIST abseil-cpp-20230125.2.tar.gz 2119685 BLAKE2B 130e55c68acdec7af0f807189365a5206427fe0bcf564a2ece9837d84429505e763399384fae89a07db6b68ed18c63918dc5ae0e53e59cdb844e4d524932abf5 SHA512 b2ba5023610aacb680b22bef894372810e6e7df76e630e56ac2f4b9498f70a872171f4562f6560ab78e837437b7bcfd3c47bfc2a5bb7fb20f28ec490dc8ed61f
DIST abseil-cpp-20230125.3.tar.gz 2119655 BLAKE2B 6c60201e4fc2cb5cd942fafb6023347739544f02fd257d003eeedff9e2e5137ee0c954342134d17a64844b9a5f309392a4c3ff9336907f35ba6c967ab03524ee SHA512 50509acfc4128fd31435631f71ac8cd0350acd9e290f78502723149016e7f07c9d84182ba99e0938b1873fecda09393d3fd7af8dabfb0d89cdcdd8a69a917e70
DIST abseil-cpp-20230802.0.tar.gz 2156669 BLAKE2B 34de2f949db3e7578cae39bdd851785fd5327a80662436e7d77f18e196cc28eb1b463e9f49c8fc66060073c6c88222015af8b41044d56af6811c8914e84fbea3 SHA512 320295fa687ded05b774741eb4c5285291d44cc14402ec5d997057cb4f53fb3ba54cd162c7a7b1003312b677603a1c25e14bfdbd1fc22ccf4b4443e8a6e3ec02
DIST abseil-cpp-20240116.2.tar.gz 2151288 BLAKE2B 2e843e29869bf69e46ec48884cbd2ba955eab2329716c4df7b9be0ded550f976184b945587af08d01a7aa77560ae679191c1a1de51c75311d3a5ee87c15017c8 SHA512 5062e731ee8c9a757e6d75fc1c558652deb4dd1daab4d6143f7ad52a139501c61365f89acbf82480be0f9a4911a58286560068d8b1a8b6774e6afad51739766e
DIST gtest-1.13.0.tar.gz 862871 BLAKE2B d2768332c233d62f7a5f5332b63dc587c96c24765b2eeaa4f4caf5d421b175aa850d81cec4f50eeef9e06d4b86cb959555b4c2862a197ce3cb86d61fcb51f5d1 SHA512 70c0cfb1b4147bdecb467ecb22ae5b5529eec0abc085763213a796b7cdbd81d1761d12b342060539b936fa54f345d33f060601544874d6213fdde79111fa813e
DIST gtest-1b18723e874b256c1e39378c6774a90701d70f7a.tar.gz 833195 BLAKE2B cfeb4fc1569529f8a08557330ab2c88db7703c4f2e8628d18b403f424342ad82b062edb8cc9c0dc122c453235ab327ea742a5ef12e49726e2fa2f60f5ea762d9 SHA512 cb90a54681e0be20a9a8c7a19f960a97cc567931308f4956ee142b86769c062fcf612b9635f5548009ee6d598ae0c1e83692151ec9f1ff1e409b89e158d8b954
DIST gtest-e68764c147ea0dac1e8811925c531d937396878e.tar.gz 862129 BLAKE2B d6decb9d1ad4e379a76119ec984deaa7649fca033f225698ce421bcee1207b52da3c4fdb2f6d68b968248575704ebe501b7b1d0a02c180901ffa78f9aa47f549 SHA512 aca72b5f64894aeee34cb869bdeda2d25ec04e901fe0e4e8d08d49472de1c9b19a97ba97a2e8570a88be74aea26d1cd526b4e605005a881e1cb6ab03ed3a4ceb

View File

@ -0,0 +1,72 @@
# Copyright 2020-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..11} )
inherit cmake python-any-r1
# yes, it needs SOURCE, not just installed one
# and no, 1.11.0 is not enough
GTEST_COMMIT="1b18723e874b256c1e39378c6774a90701d70f7a"
GTEST_FILE="gtest-${GTEST_COMMIT}.tar.gz"
DESCRIPTION="Abseil Common Libraries (C++), LTS Branch"
HOMEPAGE="https://abseil.io"
SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz
test? ( https://github.com/google/googletest/archive/${GTEST_COMMIT}.tar.gz -> ${GTEST_FILE} )"
LICENSE="
Apache-2.0
test? ( BSD )
"
SLOT="0/${PV%%.*}"
KEYWORDS="amd64 ~arm arm64 ~loong ppc64 ~riscv x86"
IUSE="test"
BDEPEND="
${PYTHON_DEPS}
test? ( sys-libs/timezone-data )
"
RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}/${PN}-20211102.0-fix-cuda-nvcc-build.patch"
"${FILESDIR}/${PN}-20211102.0-r2-cuda11.6-compile-fix.patch"
"${FILESDIR}/${PN}-20211102.0-r2-loong.patch"
"${FILESDIR}/${PN}-20211102.0-r2-gcc-13.patch"
)
src_prepare() {
cmake_src_prepare
# un-hardcode abseil compiler flags
sed -i \
-e '/"-maes",/d' \
-e '/"-msse4.1",/d' \
-e '/"-mfpu=neon"/d' \
-e '/"-march=armv8-a+crypto"/d' \
absl/copts/copts.py || die
# now generate cmake files
python_fix_shebang absl/copts/generate_copts.py
absl/copts/generate_copts.py || die
if use test; then
sed -i 's/-Werror//g' \
"${WORKDIR}/googletest-${GTEST_COMMIT}"/googletest/cmake/internal_utils.cmake || die
fi
}
src_configure() {
local mycmakeargs=(
-DABSL_ENABLE_INSTALL=TRUE
-DABSL_LOCAL_GOOGLETEST_DIR="${WORKDIR}/googletest-${GTEST_COMMIT}"
-DCMAKE_CXX_STANDARD=17
-DABSL_PROPAGATE_CXX_STD=TRUE
$(usex test -DBUILD_TESTING=ON '') #intentional usex
)
cmake_src_configure
}

View File

@ -0,0 +1,70 @@
# Copyright 2020-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..11} )
inherit cmake python-any-r1
# yes, it needs SOURCE, not just installed one
# and no, 1.11.0 is not enough
GTEST_COMMIT="e68764c147ea0dac1e8811925c531d937396878e"
GTEST_FILE="gtest-${GTEST_COMMIT}.tar.gz"
DESCRIPTION="Abseil Common Libraries (C++), LTS Branch"
HOMEPAGE="https://abseil.io"
SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz
test? ( https://github.com/google/googletest/archive/${GTEST_COMMIT}.tar.gz -> ${GTEST_FILE} )"
LICENSE="
Apache-2.0
test? ( BSD )
"
SLOT="0/${PV%%.*}"
KEYWORDS="amd64 ~arm arm64 ~loong ppc64 ~riscv x86"
IUSE="test"
BDEPEND="
${PYTHON_DEPS}
test? ( sys-libs/timezone-data )
"
RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}"/${PN}-20230125.2-musl-1.2.4.patch #906218
)
src_prepare() {
cmake_src_prepare
# un-hardcode abseil compiler flags
sed -i \
-e '/"-maes",/d' \
-e '/"-msse4.1",/d' \
-e '/"-mfpu=neon"/d' \
-e '/"-march=armv8-a+crypto"/d' \
absl/copts/copts.py || die
# now generate cmake files
python_fix_shebang absl/copts/generate_copts.py
absl/copts/generate_copts.py || die
if use test; then
sed -i 's/-Werror//g' \
"${WORKDIR}/googletest-${GTEST_COMMIT}"/googletest/cmake/internal_utils.cmake || die
fi
}
src_configure() {
local mycmakeargs=(
-DCMAKE_CXX_STANDARD=17
-DABSL_ENABLE_INSTALL=TRUE
-DABSL_LOCAL_GOOGLETEST_DIR="${WORKDIR}/googletest-${GTEST_COMMIT}"
-DABSL_PROPAGATE_CXX_STD=TRUE
-DABSL_BUILD_TESTING=$(usex test ON OFF)
$(usex test -DBUILD_TESTING=ON '') #intentional usex, it used both variables for tests.
)
cmake_src_configure
}

View File

@ -0,0 +1,70 @@
# Copyright 2020-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..11} )
inherit cmake-multilib python-any-r1
# yes, it needs SOURCE, not just installed one
GTEST_COMMIT="v1.13.0"
GTEST_FILE="gtest-${GTEST_COMMIT#v}.tar.gz"
DESCRIPTION="Abseil Common Libraries (C++), LTS Branch"
HOMEPAGE="https://abseil.io"
SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz
test? ( https://github.com/google/googletest/archive/${GTEST_COMMIT}.tar.gz -> ${GTEST_FILE} )"
LICENSE="
Apache-2.0
test? ( BSD )
"
SLOT="0/${PV%%.*}"
KEYWORDS="amd64 ~arm arm64 ~loong ppc64 ~riscv x86"
IUSE="test"
BDEPEND="
${PYTHON_DEPS}
test? ( sys-libs/timezone-data )
"
RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}"/${PN}-20230125.2-musl-1.2.4.patch #906218
)
src_prepare() {
cmake_src_prepare
# un-hardcode abseil compiler flags
sed -i \
-e '/"-maes",/d' \
-e '/"-msse4.1",/d' \
-e '/"-mfpu=neon"/d' \
-e '/"-march=armv8-a+crypto"/d' \
absl/copts/copts.py || die
# now generate cmake files
python_fix_shebang absl/copts/generate_copts.py
absl/copts/generate_copts.py || die
if use test; then
sed -i 's/-Werror//g' \
"${WORKDIR}/googletest-${GTEST_COMMIT#v}"/googletest/cmake/internal_utils.cmake || die
fi
}
multilib_src_configure() {
local mycmakeargs=(
-DCMAKE_CXX_STANDARD=17
-DABSL_ENABLE_INSTALL=TRUE
-DABSL_LOCAL_GOOGLETEST_DIR="${WORKDIR}/googletest-${GTEST_COMMIT#v}"
-DABSL_PROPAGATE_CXX_STD=TRUE
-DABSL_BUILD_TESTING=$(usex test ON OFF)
$(usex test -DBUILD_TESTING=ON '') #intentional usex, it used both variables for tests.
)
cmake_src_configure
}

View File

@ -0,0 +1,65 @@
# Copyright 2020-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
inherit cmake-multilib python-any-r1
DESCRIPTION="Abseil Common Libraries (C++), LTS Branch"
HOMEPAGE="https://abseil.io/"
SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0/${PV%%.*}.0"
KEYWORDS="amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv x86"
IUSE="test"
RDEPEND=">=dev-cpp/gtest-1.13.0[${MULTILIB_USEDEP}]"
DEPEND="${RDEPEND}"
BDEPEND="
${PYTHON_DEPS}
test? (
sys-libs/timezone-data
)
"
RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}"/${PN}-20230125.2-musl-1.2.4.patch #906218
)
src_prepare() {
cmake_src_prepare
# un-hardcode abseil compiler flags
sed -i \
-e '/"-maes",/d' \
-e '/"-msse4.1",/d' \
-e '/"-mfpu=neon"/d' \
-e '/"-march=armv8-a+crypto"/d' \
absl/copts/copts.py || die
# now generate cmake files
python_fix_shebang absl/copts/generate_copts.py
absl/copts/generate_copts.py || die
}
multilib_src_configure() {
local mycmakeargs=(
# We use -std=c++14 here so that abseil-cpp's string_view is used
# See the discussion in https://github.com/gentoo/gentoo/pull/32281.
-DCMAKE_CXX_STANDARD=14
-DABSL_ENABLE_INSTALL=TRUE
-DABSL_USE_EXTERNAL_GOOGLETEST=ON
-DABSL_PROPAGATE_CXX_STD=TRUE
# TEST_HELPERS needed for protobuf (bug #915902)
-DABSL_BUILD_TEST_HELPERS=ON
-DABSL_BUILD_TESTING=$(usex test ON OFF)
$(usex test -DBUILD_TESTING=ON '') # intentional usex, it used both variables for tests.
)
cmake_src_configure
}

View File

@ -0,0 +1,62 @@
# Copyright 2020-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
inherit cmake-multilib python-any-r1
DESCRIPTION="Abseil Common Libraries (C++), LTS Branch"
HOMEPAGE="https://abseil.io/"
SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0/${PV%%.*}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~sparc ~x86"
IUSE="test"
RDEPEND=">=dev-cpp/gtest-1.13.0[${MULTILIB_USEDEP}]"
DEPEND="${RDEPEND}"
BDEPEND="
${PYTHON_DEPS}
test? (
sys-libs/timezone-data
)
"
RESTRICT="!test? ( test )"
PATCHES=( "${FILESDIR}/${PN}-20230802.0-sdata-tests.patch" )
src_prepare() {
cmake_src_prepare
# un-hardcode abseil compiler flags
sed -i \
-e '/"-maes",/d' \
-e '/"-msse4.1",/d' \
-e '/"-mfpu=neon"/d' \
-e '/"-march=armv8-a+crypto"/d' \
absl/copts/copts.py || die
# now generate cmake files
python_fix_shebang absl/copts/generate_copts.py
absl/copts/generate_copts.py || die
}
multilib_src_configure() {
local mycmakeargs=(
# We use -std=c++14 here so that abseil-cpp's string_view is used
# See the discussion in https://github.com/gentoo/gentoo/pull/32281.
-DCMAKE_CXX_STANDARD=14
-DABSL_ENABLE_INSTALL=TRUE
-DABSL_USE_EXTERNAL_GOOGLETEST=ON
-DABSL_PROPAGATE_CXX_STD=TRUE
# TEST_HELPERS needed for protobuf (bug #915902)
-DABSL_BUILD_TEST_HELPERS=ON
-DABSL_BUILD_TESTING=$(usex test ON OFF)
$(usex test -DBUILD_TESTING=ON '') # intentional usex, it used both variables for tests.
)
cmake_src_configure
}

View File

@ -0,0 +1,62 @@
# Copyright 2020-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
inherit cmake-multilib python-any-r1
DESCRIPTION="Abseil Common Libraries (C++), LTS Branch"
HOMEPAGE="https://abseil.io/"
SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0/${PV%%.*}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~sparc ~x86"
IUSE="test"
RDEPEND=">=dev-cpp/gtest-1.13.0[${MULTILIB_USEDEP}]"
DEPEND="${RDEPEND}"
BDEPEND="
${PYTHON_DEPS}
test? (
sys-libs/timezone-data
)
"
RESTRICT="!test? ( test )"
PATCHES=( "${FILESDIR}/${PN}-20230802.0-sdata-tests.patch" )
src_prepare() {
cmake_src_prepare
# un-hardcode abseil compiler flags
sed -i \
-e '/"-maes",/d' \
-e '/"-msse4.1",/d' \
-e '/"-mfpu=neon"/d' \
-e '/"-march=armv8-a+crypto"/d' \
absl/copts/copts.py || die
# now generate cmake files
python_fix_shebang absl/copts/generate_copts.py
absl/copts/generate_copts.py || die
}
multilib_src_configure() {
local mycmakeargs=(
# We use -std=c++14 here so that abseil-cpp's string_view is used
# See the discussion in https://github.com/gentoo/gentoo/pull/32281.
-DCMAKE_CXX_STANDARD=14
-DABSL_ENABLE_INSTALL=TRUE
-DABSL_USE_EXTERNAL_GOOGLETEST=ON
-DABSL_PROPAGATE_CXX_STD=TRUE
# TEST_HELPERS needed for protobuf (bug #915902)
-DABSL_BUILD_TEST_HELPERS=ON
-DABSL_BUILD_TESTING=$(usex test ON OFF)
$(usex test -DBUILD_TESTING=ON '') # intentional usex, it used both variables for tests.
)
cmake_src_configure
}

View File

@ -0,0 +1,51 @@
Fixes compile failure with CUDA nvcc
https://github.com/abseil/abseil-cpp/commit/5202173ca7671ebe241cb4d9447dc4b1f2d3ec10
https://github.com/tensorflow/tensorflow/commit/e45ca6adf2458d4759e5c40f1f27bbf9505a3c79#diff-b79a9a542260a33fd122a5d1cdb923e08e16cbe321d69c014a9acdde34052b3dR235
From 5202173ca7671ebe241cb4d9447dc4b1f2d3ec10 Mon Sep 17 00:00:00 2001
From: Abseil Team <absl-team@google.com>
Date: Tue, 1 Feb 2022 13:52:49 -0800
Subject: [PATCH] Export of internal Abseil changes
--
121db1a08321eaa3006726cc32b459cf17880e35 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 425707805
--
0dec484389bbb75aae0a412146e3564bf833a739 by Derek Mauro <dmauro@google.com>:
macOS CI: Avoid depending on external sites like GitHub by prepopulating
dependencies and setting --distdir
Our Linux CI does this, but for some reason was never enabled on macOS
PiperOrigin-RevId: 425668638
GitOrigin-RevId: 121db1a08321eaa3006726cc32b459cf17880e35
Change-Id: Id51645df90b6a0808dd5b18eb636a10f798e24ea
--- a/absl/container/internal/inlined_vector.h
+++ b/absl/container/internal/inlined_vector.h
@@ -925,8 +925,8 @@ auto Storage<T, N, A>::Swap(Storage* other_storage_ptr) -> void {
inlined_ptr->GetSize());
}
ABSL_INTERNAL_CATCH_ANY {
- allocated_ptr->SetAllocation(
- {allocated_storage_view.data, allocated_storage_view.capacity});
+ allocated_ptr->SetAllocation(Allocation<A>{
+ allocated_storage_view.data, allocated_storage_view.capacity});
ABSL_INTERNAL_RETHROW;
}
@@ -934,8 +934,8 @@ auto Storage<T, N, A>::Swap(Storage* other_storage_ptr) -> void {
inlined_ptr->GetInlinedData(),
inlined_ptr->GetSize());
- inlined_ptr->SetAllocation(
- {allocated_storage_view.data, allocated_storage_view.capacity});
+ inlined_ptr->SetAllocation(Allocation<A>{allocated_storage_view.data,
+ allocated_storage_view.capacity});
}
swap(GetSizeAndIsAllocated(), other_storage_ptr->GetSizeAndIsAllocated());

View File

@ -0,0 +1,22 @@
--- a/absl/strings/internal/string_constant.h
+++ b/absl/strings/internal/string_constant.h
@@ -35,12 +35,18 @@ namespace strings_internal {
// below.
template <typename T>
struct StringConstant {
+ private:
+ static constexpr bool ValidateConstant(absl::string_view view) {
+ return view.empty() || 2 * view[0] != 1;
+ }
+
+public:
static constexpr absl::string_view value = T{}();
constexpr absl::string_view operator()() const { return value; }
// Check to be sure `view` points to constant data.
// Otherwise, it can't be constant evaluated.
- static_assert(value.empty() || 2 * value[0] != 1,
+ static_assert(ValidateConstant(value),
"The input string_view must point to constant data.");
};

View File

@ -0,0 +1,24 @@
https://github.com/abseil/abseil-cpp/commit/36a4b073f1e7e02ed7d1ac140767e36f82f09b7c
From 36a4b073f1e7e02ed7d1ac140767e36f82f09b7c Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyich@gmail.com>
Date: Fri, 27 May 2022 22:27:58 +0100
Subject: [PATCH] absl/strings/internal/str_format/extension.h: add missing
<stdint.h> include
Without the change absl-cpp build fails on this week's gcc-13 snapshot as:
/build/abseil-cpp/absl/strings/internal/str_format/extension.h:34:33: error: found ':' in nested-name-specifier, expected '::'
34 | enum class FormatConversionChar : uint8_t;
| ^
| ::
--- a/absl/strings/internal/str_format/extension.h
+++ b/absl/strings/internal/str_format/extension.h
@@ -17,6 +17,7 @@
#define ABSL_STRINGS_INTERNAL_STR_FORMAT_EXTENSION_H_
#include <limits.h>
+#include <stdint.h>
#include <cstddef>
#include <cstring>

View File

@ -0,0 +1,18 @@
https://github.com/abseil/abseil-cpp/commit/808bc202fc13e85a7948db0d7fb58f0f051200b1
From 808bc202fc13e85a7948db0d7fb58f0f051200b1 Mon Sep 17 00:00:00 2001
From: imaiguo <maaiguo@uniontech.com>
Date: Wed, 23 Feb 2022 22:56:32 +0800
Subject: [PATCH] Add support of loongarch64 (#1110)
--- a/absl/debugging/internal/examine_stack.cc
+++ b/absl/debugging/internal/examine_stack.cc
@@ -82,6 +82,8 @@ void* GetProgramCounter(void* vuc) {
return reinterpret_cast<void*>(context->uc_mcontext.gregs[16]);
#elif defined(__e2k__)
return reinterpret_cast<void*>(context->uc_mcontext.cr0_hi);
+#elif defined(__loongarch__)
+ return reinterpret_cast<void*>(context->uc_mcontext.__pc);
#else
#error "Undefined Architecture."
#endif

View File

@ -0,0 +1,49 @@
https://bugs.gentoo.org/906218
https://github.com/abseil/abseil-cpp/issues/1473
https://github.com/abseil/abseil-cpp/commit/4500c2fada4e952037c59bd65e8be1ba0b29f21e
From 4500c2fada4e952037c59bd65e8be1ba0b29f21e Mon Sep 17 00:00:00 2001
From: Derek Mauro <dmauro@google.com>
Date: Mon, 12 Jun 2023 08:11:36 -0700
Subject: [PATCH] DirectMmap: Use off_t instead of off64_t for the offset
parameter
off_t is best for portability. Its size varies with the platform.
off64_t is non-standard, but is present in glibc and some BSDs.
It also matches the signature specified in the manual.
https://man7.org/linux/man-pages/man2/mmap.2.html
This is a re-spin of #1349, but correctly casts the type to the type
expected by the kernel for mmap2.
https://man7.org/linux/man-pages/man2/mmap2.2.html
Fixes #1473
PiperOrigin-RevId: 539656313
Change-Id: I7a30dd9d3eb6af03a99da0d93d721a86f6521b25
---
absl/base/internal/direct_mmap.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h
index 815b8d23ba3..1beb2ee4e52 100644
--- a/absl/base/internal/direct_mmap.h
+++ b/absl/base/internal/direct_mmap.h
@@ -72,7 +72,7 @@ namespace base_internal {
// Platform specific logic extracted from
// https://chromium.googlesource.com/linux-syscall-support/+/master/linux_syscall_support.h
inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd,
- off64_t offset) noexcept {
+ off_t offset) noexcept {
#if defined(__i386__) || defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \
defined(__m68k__) || defined(__sh__) || \
(defined(__hppa__) && !defined(__LP64__)) || \
@@ -102,7 +102,7 @@ inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd,
#else
return reinterpret_cast<void*>(
syscall(SYS_mmap2, start, length, prot, flags, fd,
- static_cast<off_t>(offset / pagesize)));
+ static_cast<unsigned long>(offset / pagesize))); // NOLINT
#endif
#elif defined(__s390x__)
// On s390x, mmap() arguments are passed in memory.

View File

@ -0,0 +1,41 @@
https://bugs.gentoo.org/show_bug.cgi?id=917062
https://github.com/matoro/abseil-cpp/commit/cc37c61553fa2a186d4abf48e97ad9df4e5d62e3
From cc37c61553fa2a186d4abf48e97ad9df4e5d62e3 Mon Sep 17 00:00:00 2001
From: matoro <matoro@users.noreply.github.com>
Date: Tue, 14 Nov 2023 10:39:34 -0500
Subject: [PATCH] symbolize_test: account for platforms with ".sdata" small
data sections
A handful of ELF targets use a ".sdata" section for small data. The
default maximum size of symbols in this section as well as the gcc flag
to change that maximum size differ between two targets. On such
platforms, if there is no data large enough to exceed the small data
limit then the ".data" section will be excluded entirely. This changes
the check to ensure that at least one of a ".sdata" section OR a ".data"
section is present.
---
absl/debugging/symbolize_test.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/absl/debugging/symbolize_test.cc b/absl/debugging/symbolize_test.cc
index d0feab2ffa6..1e4b5ba6105 100644
--- a/absl/debugging/symbolize_test.cc
+++ b/absl/debugging/symbolize_test.cc
@@ -44,6 +44,7 @@
#define MAP_ANONYMOUS MAP_ANON
#endif
+using testing::AnyOf;
using testing::Contains;
#ifdef _WIN32
@@ -456,7 +457,7 @@ TEST(Symbolize, ForEachSection) {
EXPECT_THAT(sections, Contains(".rodata"));
EXPECT_THAT(sections, Contains(".bss"));
++in_data_section;
- EXPECT_THAT(sections, Contains(".data"));
+ EXPECT_THAT(sections, AnyOf(Contains(".data"), Contains(".sdata")));
close(fd);
}

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<upstream>
<remote-id type="github">abseil/abseil-cpp</remote-id>
</upstream>
</pkgmetadata>