summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatoro Mahri <matoro_gentoo@matoro.tk>2023-11-18 23:44:05 -0500
committerSam James <sam@gentoo.org>2023-11-20 10:03:52 +0000
commitab3288fee25a9c80d6a25ceb79e564c85ad1cb1e (patch)
tree5e44baf60eb8fc14a339fa59a48c37028371de63 /dev-cpp/abseil-cpp
parentxfce-extra/xfce4-xkb-plugin: unkeyword 0.8.3 for ~alpha (diff)
downloadgentoo-ab3288fee25a9c80d6a25ceb79e564c85ad1cb1e.tar.gz
gentoo-ab3288fee25a9c80d6a25ceb79e564c85ad1cb1e.tar.bz2
gentoo-ab3288fee25a9c80d6a25ceb79e564c85ad1cb1e.zip
dev-cpp/abseil-cpp: add patch for test on .sdata platforms
See: https://github.com/matoro/abseil-cpp/commit/cc37c61553fa2a186d4abf48e97ad9df4e5d62e3 Bug: https://bugs.gentoo.org/917062 Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-cpp/abseil-cpp')
-rw-r--r--dev-cpp/abseil-cpp/abseil-cpp-20230802.0.ebuild1
-rw-r--r--dev-cpp/abseil-cpp/files/abseil-cpp-20230802.0-sdata-tests.patch41
2 files changed, 42 insertions, 0 deletions
diff --git a/dev-cpp/abseil-cpp/abseil-cpp-20230802.0.ebuild b/dev-cpp/abseil-cpp/abseil-cpp-20230802.0.ebuild
index bf2a6afad44c..614d40121204 100644
--- a/dev-cpp/abseil-cpp/abseil-cpp-20230802.0.ebuild
+++ b/dev-cpp/abseil-cpp/abseil-cpp-20230802.0.ebuild
@@ -28,6 +28,7 @@ BDEPEND="
"
RESTRICT="!test? ( test )"
+PATCHES=( "${FILESDIR}/${PN}-20230802.0-sdata-tests.patch" )
src_prepare() {
cmake_src_prepare
diff --git a/dev-cpp/abseil-cpp/files/abseil-cpp-20230802.0-sdata-tests.patch b/dev-cpp/abseil-cpp/files/abseil-cpp-20230802.0-sdata-tests.patch
new file mode 100644
index 000000000000..67d3a9697731
--- /dev/null
+++ b/dev-cpp/abseil-cpp/files/abseil-cpp-20230802.0-sdata-tests.patch
@@ -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);
+ }