aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/abseil-cpp
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/abseil-cpp')
-rw-r--r--meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Export-of-internal-Abseil-changes.patch87
-rw-r--r--meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch11
-rw-r--r--meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch16
-rw-r--r--meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Remove-neon-option-from-cross-compilation.patch49
-rw-r--r--meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/abseil-ppc-fixes.patch35
-rw-r--r--meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240116.2.bb (renamed from meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb)41
6 files changed, 113 insertions, 126 deletions
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Export-of-internal-Abseil-changes.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Export-of-internal-Abseil-changes.patch
deleted file mode 100644
index 126b79261c..0000000000
--- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Export-of-internal-Abseil-changes.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From c9250af98f48e4aa734cab0e2f5ae1f780c05ad0 Mon Sep 17 00:00:00 2001
-From: Zang Ruochen <zangrc.fnst@fujitsu.com>
-Date: Fri, 11 Jun 2021 10:53:37 +0900
-Subject: [PATCH] Export of internal Abseil changes
-
---
-cf88f9cf40eab54c06bca7f20795352ec23bb583 by Derek Mauro <dmauro@google.com>:
-
-Fixes build with latest glibc
-Fixes #952
-
-PiperOrigin-RevId: 371693908
-
---
-99bcd0f4a747ce7a401e23c745adf34d0ec5131b by Samuel Benzaquen <sbenza@google.com>:
-
-Add support for std::string_view in StrFormat even when
-absl::string_view != std::string_view.
-
-PiperOrigin-RevId: 371693633
-
---
-e35463572149a6c2d4a0d439b9300ce03fd6b96d by Abseil Team <absl-team@google.com>:
-
-Cmake builds should only install pkg-config when explicitly requested.
-
-PiperOrigin-RevId: 371403419
-GitOrigin-RevId: cf88f9cf40eab54c06bca7f20795352ec23bb583
-Change-Id: I4360a18c638a4d901ff44ab1e0a9d8f321c302ea
-
-Signed-off-by: Zang Ruochen <zangrc.fnst@fujitsu.com>
----
- CMake/AbseilHelpers.cmake | 3 ++-
- absl/strings/internal/str_format/arg.h | 8 ++++++++
- absl/strings/internal/str_format/convert_test.cc | 3 +++
- 3 files changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake
-index 54fb8df3..a32b94d5 100644
---- a/CMake/AbseilHelpers.cmake
-+++ b/CMake/AbseilHelpers.cmake
-@@ -141,7 +141,8 @@ function(absl_cc_library)
- endif()
-
- # Generate a pkg-config file for every library:
-- if(_build_type STREQUAL "static" OR _build_type STREQUAL "shared")
-+ if((_build_type STREQUAL "static" OR _build_type STREQUAL "shared")
-+ AND ABSL_ENABLE_INSTALL)
- if(NOT ABSL_CC_LIB_TESTONLY)
- if(absl_VERSION)
- set(PC_VERSION "${absl_VERSION}")
-diff --git a/absl/strings/internal/str_format/arg.h b/absl/strings/internal/str_format/arg.h
-index 7040c866..3c91be70 100644
---- a/absl/strings/internal/str_format/arg.h
-+++ b/absl/strings/internal/str_format/arg.h
-@@ -122,6 +122,14 @@ StringConvertResult FormatConvertImpl(const std::string& v,
- StringConvertResult FormatConvertImpl(string_view v,
- FormatConversionSpecImpl conv,
- FormatSinkImpl* sink);
-+#if defined(ABSL_HAVE_STD_STRING_VIEW) && !defined(ABSL_USES_STD_STRING_VIEW)
-+inline StringConvertResult FormatConvertImpl(std::string_view v,
-+ FormatConversionSpecImpl conv,
-+ FormatSinkImpl* sink) {
-+ return FormatConvertImpl(absl::string_view(v.data(), v.size()), conv, sink);
-+}
-+#endif // ABSL_HAVE_STD_STRING_VIEW && !ABSL_USES_STD_STRING_VIEW
-+
- ArgConvertResult<FormatConversionCharSetUnion(
- FormatConversionCharSetInternal::s, FormatConversionCharSetInternal::p)>
- FormatConvertImpl(const char* v, const FormatConversionSpecImpl conv,
-diff --git a/absl/strings/internal/str_format/convert_test.cc b/absl/strings/internal/str_format/convert_test.cc
-index 926283cf..91e03609 100644
---- a/absl/strings/internal/str_format/convert_test.cc
-+++ b/absl/strings/internal/str_format/convert_test.cc
-@@ -229,6 +229,9 @@ TEST_F(FormatConvertTest, BasicString) {
- TestStringConvert(static_cast<const char*>("hello"));
- TestStringConvert(std::string("hello"));
- TestStringConvert(string_view("hello"));
-+#if defined(ABSL_HAVE_STD_STRING_VIEW)
-+ TestStringConvert(std::string_view("hello"));
-+#endif // ABSL_HAVE_STD_STRING_VIEW
- }
-
- TEST_F(FormatConvertTest, NullString) {
---
-2.25.1
-
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch
index 2bafcc6b13..5242b29e06 100644
--- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch
+++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch
@@ -1,7 +1,7 @@
-From 8f21fdfb83b0fa844a9f1f03a86a9ca46642d85e Mon Sep 17 00:00:00 2001
+From 738549dea7a4e6c462a79962c414eaa450c2cffd Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 9 Apr 2020 13:06:27 -0700
-Subject: [PATCH 1/2] absl: always use <asm/sgidefs.h>
+Subject: [PATCH 1/3] absl: always use <asm/sgidefs.h>
Fixes mips/musl build, since sgidefs.h is not present on all C libraries
but on linux asm/sgidefs.h is there and contains same definitions, using
@@ -10,26 +10,27 @@ that makes it portable.
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
absl/base/internal/direct_mmap.h | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h
-index 16accf096604..ba7936cc934e 100644
+index e492bb0..c8a4fba 100644
--- a/absl/base/internal/direct_mmap.h
+++ b/absl/base/internal/direct_mmap.h
@@ -41,13 +41,9 @@
#ifdef __mips__
// Include definitions of the ABI currently in use.
--#ifdef __BIONIC__
+-#if defined(__BIONIC__) || !defined(__GLIBC__)
-// Android doesn't have sgidefs.h, but does have asm/sgidefs.h, which has the
+// bionic/musl C libs don't have sgidefs.h, but do have asm/sgidefs.h, which has the
// definitions we need.
#include <asm/sgidefs.h>
-#else
-#include <sgidefs.h>
--#endif // __BIONIC__
+-#endif // __BIONIC__ || !__GLIBC__
#endif // __mips__
// SYS_mmap and SYS_munmap are not defined in Android.
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch
index da9dbd9367..b92a487523 100644
--- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch
+++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch
@@ -1,18 +1,20 @@
-From a9e15a4855c82eb948dedeecd83d5e17c3c8f767 Mon Sep 17 00:00:00 2001
+From d25cf3b9aa873595a19e197cc29ab46c0093bff1 Mon Sep 17 00:00:00 2001
From: Sinan Kaya <sinan.kaya@microsoft.com>
Date: Mon, 3 Feb 2020 03:25:57 +0000
-Subject: [PATCH 2/2] Remove maes option from cross-compilation
+Subject: [PATCH 2/3] Remove maes option from cross-compilation
---
+Upstream-Status: Pending
+
absl/copts/GENERATED_AbseilCopts.cmake | 4 ----
absl/copts/GENERATED_copts.bzl | 4 ----
2 files changed, 8 deletions(-)
diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake
-index 97bd283eb739..ce29ac031b9c 100644
+index a4ab1aa2041e..23b9253c1f00 100644
--- a/absl/copts/GENERATED_AbseilCopts.cmake
+++ b/absl/copts/GENERATED_AbseilCopts.cmake
-@@ -210,7 +210,3 @@ list(APPEND ABSL_RANDOM_HWAES_ARM64_FLAGS
+@@ -158,7 +158,3 @@ list(APPEND ABSL_RANDOM_HWAES_ARM64_FLAGS
list(APPEND ABSL_RANDOM_HWAES_MSVC_X64_FLAGS
)
@@ -21,10 +23,10 @@ index 97bd283eb739..ce29ac031b9c 100644
- "-msse4.1"
-)
diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl
-index bcdd61ef8211..3e8eddd4bb08 100644
+index a6efc98e11d4..1e847f769501 100644
--- a/absl/copts/GENERATED_copts.bzl
+++ b/absl/copts/GENERATED_copts.bzl
-@@ -211,7 +211,3 @@ ABSL_RANDOM_HWAES_ARM64_FLAGS = [
+@@ -159,7 +159,3 @@ ABSL_RANDOM_HWAES_ARM64_FLAGS = [
ABSL_RANDOM_HWAES_MSVC_X64_FLAGS = [
]
@@ -33,5 +35,5 @@ index bcdd61ef8211..3e8eddd4bb08 100644
- "-msse4.1",
-]
--
-2.25.1
+2.36.1
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Remove-neon-option-from-cross-compilation.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Remove-neon-option-from-cross-compilation.patch
new file mode 100644
index 0000000000..1a80a428b7
--- /dev/null
+++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Remove-neon-option-from-cross-compilation.patch
@@ -0,0 +1,49 @@
+From fb24c3e3539b5743d398a429a302a3886186f261 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jonas.gorski@bisdn.de>
+Date: Thu, 16 Jun 2022 11:46:31 +0000
+Subject: [PATCH 3/3] Remove neon option from cross compilation
+
+Not every arm platform supports neon instructions, so do not enforce
+them.
+
+Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
+---
+Upstream-Status: Pending
+
+ absl/copts/GENERATED_AbseilCopts.cmake | 4 ----
+ absl/copts/GENERATED_copts.bzl | 4 ----
+ 2 files changed, 8 deletions(-)
+
+diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake
+index 23b9253c1f00..5d112a97f3e4 100644
+--- a/absl/copts/GENERATED_AbseilCopts.cmake
++++ b/absl/copts/GENERATED_AbseilCopts.cmake
+@@ -147,10 +147,6 @@ list(APPEND ABSL_MSVC_TEST_FLAGS
+ "/DNOMINMAX"
+ )
+
+-list(APPEND ABSL_RANDOM_HWAES_ARM32_FLAGS
+- "-mfpu=neon"
+-)
+-
+ list(APPEND ABSL_RANDOM_HWAES_ARM64_FLAGS
+ "-march=armv8-a+crypto"
+ )
+diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl
+index 1e847f769501..3e10db204faf 100644
+--- a/absl/copts/GENERATED_copts.bzl
++++ b/absl/copts/GENERATED_copts.bzl
+@@ -148,10 +148,6 @@ ABSL_MSVC_TEST_FLAGS = [
+ "/DNOMINMAX",
+ ]
+
+-ABSL_RANDOM_HWAES_ARM32_FLAGS = [
+- "-mfpu=neon",
+-]
+-
+ ABSL_RANDOM_HWAES_ARM64_FLAGS = [
+ "-march=armv8-a+crypto",
+ ]
+--
+2.36.1
+
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/abseil-ppc-fixes.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/abseil-ppc-fixes.patch
index a4937e1b33..f2ebd9f08c 100644
--- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/abseil-ppc-fixes.patch
+++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/abseil-ppc-fixes.patch
@@ -1,3 +1,5 @@
+Upstream-Status: Pending
+
An all-in-one patch that fixes several issues:
1) UnscaledCycleClock not fully implemented for ppc*-musl (disabled on musl)
@@ -14,38 +16,39 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
@@ -20,7 +20,7 @@
#include <intrin.h>
#endif
-
+
-#if defined(__powerpc__) || defined(__ppc__)
+#if (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)
#ifdef __GLIBC__
#include <sys/platform/ppc.h>
#elif defined(__FreeBSD__)
-@@ -59,7 +59,7 @@ double UnscaledCycleClock::Frequency() {
+@@ -58,7 +58,7 @@ double UnscaledCycleClock::Frequency() {
return base_internal::NominalCPUFrequency();
}
-
+
-#elif defined(__powerpc__) || defined(__ppc__)
+#elif (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)
-
+
int64_t UnscaledCycleClock::Now() {
#ifdef __GLIBC__
---- a/absl/base/internal/unscaledcycleclock.h
-+++ b/absl/base/internal/unscaledcycleclock.h
-@@ -46,7 +46,7 @@
-
+--- a/absl/base/internal/unscaledcycleclock_config.h
++++ b/absl/base/internal/unscaledcycleclock_config.h
+@@ -21,7 +21,8 @@
+
// The following platforms have an implementation of a hardware counter.
#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \
-- defined(__powerpc__) || defined(__ppc__) || \
-+ ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \
- defined(_M_IX86) || defined(_M_X64)
+- defined(__powerpc__) || defined(__ppc__) || defined(__riscv) || \
++ ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \
++ defined(__riscv) || \
+ defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC))
#define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1
#else
--- a/absl/debugging/internal/examine_stack.cc
+++ b/absl/debugging/internal/examine_stack.cc
-@@ -27,6 +27,10 @@
+@@ -33,6 +33,10 @@
#include <csignal>
#include <cstdio>
-
+
+#if defined(__powerpc__)
+#include <asm/ptrace.h>
+#endif
@@ -53,7 +56,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "absl/base/attributes.h"
#include "absl/base/internal/raw_logging.h"
#include "absl/base/macros.h"
-@@ -63,8 +67,10 @@ void* GetProgramCounter(void* vuc) {
+@@ -174,8 +178,10 @@ void* GetProgramCounter(void* const vuc) {
return reinterpret_cast<void*>(context->uc_mcontext.pc);
#elif defined(__powerpc64__)
return reinterpret_cast<void*>(context->uc_mcontext.gp_regs[32]);
@@ -61,13 +64,13 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
+#elif defined(__powerpc__) && defined(__GLIBC__)
return reinterpret_cast<void*>(context->uc_mcontext.uc_regs->gregs[32]);
+#elif defined(__powerpc__)
-+ return reinterpret_cast<void*>(((struct pt_regs *)context->uc_regs)->gregs[32]);
++ return reinterpret_cast<void*>((context->uc_regs)->gregs[32]);
#elif defined(__riscv)
return reinterpret_cast<void*>(context->uc_mcontext.__gregs[REG_PC]);
#elif defined(__s390__) && !defined(__s390x__)
--- a/absl/debugging/internal/stacktrace_config.h
+++ b/absl/debugging/internal/stacktrace_config.h
-@@ -55,7 +55,7 @@
+@@ -60,7 +60,7 @@
#elif defined(__i386__) || defined(__x86_64__)
#define ABSL_STACKTRACE_INL_HEADER \
"absl/debugging/internal/stacktrace_x86-inl.inc"
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240116.2.bb
index 37d5d81238..2aef973910 100644
--- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
+++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20240116.2.bb
@@ -1,34 +1,53 @@
SUMMARY = "Abseil is a cpp library like STL"
DESCRIPTION = "Abseil provides pieces missing from the C++ standard. Contains \
additional useful libraries like algorithm, container, debugging, hash, memory, \
-meta, numeric, strings, synchronization, time, types and utility"
+meta, numeric, strings, synchronization, time, types and utility."
HOMEPAGE = "https://abseil.io/"
SECTION = "libs"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915"
-PV = "20210324.2+git${SRCPV}"
-SRCREV = "278e0a071885a22dcd2fd1b5576cc44757299343"
-BRANCH = "lts_2021_03_24"
+SRCREV = "d7aaad83b488fd62bd51c81ecf16cd938532cc0a"
+BRANCH = "lts_2024_01_16"
SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH};protocol=https \
file://0001-absl-always-use-asm-sgidefs.h.patch \
file://0002-Remove-maes-option-from-cross-compilation.patch \
file://abseil-ppc-fixes.patch \
- file://0001-Export-of-internal-Abseil-changes.patch \
+ file://0003-Remove-neon-option-from-cross-compilation.patch \
"
S = "${WORKDIR}/git"
-ASNEEDED:class-native = ""
-ASNEEDED:class-nativesdk = ""
-
inherit cmake
EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
- -DCMAKE_CXX_STANDARD=14 \
+ -DABSL_ENABLE_INSTALL=ON \
"
-BBCLASSEXTEND = "native nativesdk"
+SYSROOT_DIRS:append:class-nativesdk:mingw32 = " ${bindir}"
+
+PACKAGES_DYNAMIC = "^libabsl-*"
+PACKAGES_DYNAMIC:class-native = ""
+
+PACKAGESPLITFUNCS =+ "split_dynamic_packages"
-FILES:${PN}-dev += "${includedir} ${libdir}/cmake ${libdir}/pkgconfig"
+python split_dynamic_packages() {
+ libdir = d.getVar('libdir')
+
+ libpackages = do_split_packages(
+ d,
+ root=libdir,
+ file_regex=r'^libabsl_(.*)\.so\..*$',
+ output_pattern='libabsl-%s',
+ description="abseil shared library %s",
+ prepend=True,
+ extra_depends='',
+ )
+ if libpackages:
+ d.appendVar('RDEPENDS:' + d.getVar('PN'), ' ' + ' '.join(libpackages))
+}
+
+ALLOW_EMPTY:${PN} = "1"
+
+BBCLASSEXTEND = "native nativesdk"