diff options
3 files changed, 109 insertions, 25 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 new file mode 100644 index 0000000000..52d4f42d52 --- /dev/null +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Export-of-internal-Abseil-changes.patch | |||
| @@ -0,0 +1,100 @@ | |||
| 1 | From a9831f1cbf93fb18dd951453635f488037454ce9 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Abseil Team <absl-team@google.com> | ||
| 3 | Date: Mon, 3 May 2021 07:37:39 -0700 | ||
| 4 | Subject: [PATCH] Export of internal Abseil changes | ||
| 5 | |||
| 6 | -- | ||
| 7 | cf88f9cf40eab54c06bca7f20795352ec23bb583 by Derek Mauro <dmauro@google.com>: | ||
| 8 | |||
| 9 | Fixes build with latest glibc | ||
| 10 | Fixes #952 | ||
| 11 | |||
| 12 | PiperOrigin-RevId: 371693908 | ||
| 13 | |||
| 14 | -- | ||
| 15 | 99bcd0f4a747ce7a401e23c745adf34d0ec5131b by Samuel Benzaquen <sbenza@google.com>: | ||
| 16 | |||
| 17 | Add support for std::string_view in StrFormat even when | ||
| 18 | absl::string_view != std::string_view. | ||
| 19 | |||
| 20 | PiperOrigin-RevId: 371693633 | ||
| 21 | |||
| 22 | -- | ||
| 23 | e35463572149a6c2d4a0d439b9300ce03fd6b96d by Abseil Team <absl-team@google.com>: | ||
| 24 | |||
| 25 | Cmake builds should only install pkg-config when explicitly requested. | ||
| 26 | |||
| 27 | PiperOrigin-RevId: 371403419 | ||
| 28 | GitOrigin-RevId: cf88f9cf40eab54c06bca7f20795352ec23bb583 | ||
| 29 | Change-Id: I4360a18c638a4d901ff44ab1e0a9d8f321c302ea | ||
| 30 | --- | ||
| 31 | CMake/AbseilHelpers.cmake | 3 ++- | ||
| 32 | absl/debugging/failure_signal_handler.cc | 3 ++- | ||
| 33 | absl/strings/internal/str_format/arg.h | 8 ++++++++ | ||
| 34 | absl/strings/internal/str_format/convert_test.cc | 3 +++ | ||
| 35 | 4 files changed, 15 insertions(+), 2 deletions(-) | ||
| 36 | |||
| 37 | diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake | ||
| 38 | index 1f754392..1a80b5b4 100644 | ||
| 39 | --- a/CMake/AbseilHelpers.cmake | ||
| 40 | +++ b/CMake/AbseilHelpers.cmake | ||
| 41 | @@ -141,7 +141,8 @@ function(absl_cc_library) | ||
| 42 | endif() | ||
| 43 | |||
| 44 | # Generate a pkg-config file for every library: | ||
| 45 | - if(_build_type STREQUAL "static" OR _build_type STREQUAL "shared") | ||
| 46 | + if((_build_type STREQUAL "static" OR _build_type STREQUAL "shared") | ||
| 47 | + AND ABSL_ENABLE_INSTALL) | ||
| 48 | if(NOT ABSL_CC_LIB_TESTONLY) | ||
| 49 | if(absl_VERSION) | ||
| 50 | set(PC_VERSION "${absl_VERSION}") | ||
| 51 | diff --git a/absl/debugging/failure_signal_handler.cc b/absl/debugging/failure_signal_handler.cc | ||
| 52 | index e458a795..689e5979 100644 | ||
| 53 | --- a/absl/debugging/failure_signal_handler.cc | ||
| 54 | +++ b/absl/debugging/failure_signal_handler.cc | ||
| 55 | @@ -136,7 +136,8 @@ static bool SetupAlternateStackOnce() { | ||
| 56 | #else | ||
| 57 | const size_t page_mask = sysconf(_SC_PAGESIZE) - 1; | ||
| 58 | #endif | ||
| 59 | - size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; | ||
| 60 | + size_t stack_size = | ||
| 61 | + (std::max<size_t>(SIGSTKSZ, 65536) + page_mask) & ~page_mask; | ||
| 62 | #if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \ | ||
| 63 | defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER) | ||
| 64 | // Account for sanitizer instrumentation requiring additional stack space. | ||
| 65 | diff --git a/absl/strings/internal/str_format/arg.h b/absl/strings/internal/str_format/arg.h | ||
| 66 | index 7040c866..3c91be70 100644 | ||
| 67 | --- a/absl/strings/internal/str_format/arg.h | ||
| 68 | +++ b/absl/strings/internal/str_format/arg.h | ||
| 69 | @@ -122,6 +122,14 @@ StringConvertResult FormatConvertImpl(const std::string& v, | ||
| 70 | StringConvertResult FormatConvertImpl(string_view v, | ||
| 71 | FormatConversionSpecImpl conv, | ||
| 72 | FormatSinkImpl* sink); | ||
| 73 | +#if defined(ABSL_HAVE_STD_STRING_VIEW) && !defined(ABSL_USES_STD_STRING_VIEW) | ||
| 74 | +inline StringConvertResult FormatConvertImpl(std::string_view v, | ||
| 75 | + FormatConversionSpecImpl conv, | ||
| 76 | + FormatSinkImpl* sink) { | ||
| 77 | + return FormatConvertImpl(absl::string_view(v.data(), v.size()), conv, sink); | ||
| 78 | +} | ||
| 79 | +#endif // ABSL_HAVE_STD_STRING_VIEW && !ABSL_USES_STD_STRING_VIEW | ||
| 80 | + | ||
| 81 | ArgConvertResult<FormatConversionCharSetUnion( | ||
| 82 | FormatConversionCharSetInternal::s, FormatConversionCharSetInternal::p)> | ||
| 83 | FormatConvertImpl(const char* v, const FormatConversionSpecImpl conv, | ||
| 84 | diff --git a/absl/strings/internal/str_format/convert_test.cc b/absl/strings/internal/str_format/convert_test.cc | ||
| 85 | index 926283cf..91e03609 100644 | ||
| 86 | --- a/absl/strings/internal/str_format/convert_test.cc | ||
| 87 | +++ b/absl/strings/internal/str_format/convert_test.cc | ||
| 88 | @@ -229,6 +229,9 @@ TEST_F(FormatConvertTest, BasicString) { | ||
| 89 | TestStringConvert(static_cast<const char*>("hello")); | ||
| 90 | TestStringConvert(std::string("hello")); | ||
| 91 | TestStringConvert(string_view("hello")); | ||
| 92 | +#if defined(ABSL_HAVE_STD_STRING_VIEW) | ||
| 93 | + TestStringConvert(std::string_view("hello")); | ||
| 94 | +#endif // ABSL_HAVE_STD_STRING_VIEW | ||
| 95 | } | ||
| 96 | |||
| 97 | TEST_F(FormatConvertTest, NullString) { | ||
| 98 | -- | ||
| 99 | 2.31.1 | ||
| 100 | |||
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 ee0c25473b..a4937e1b33 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 | |||
| @@ -53,21 +53,21 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
| 53 | #include "absl/base/attributes.h" | 53 | #include "absl/base/attributes.h" |
| 54 | #include "absl/base/internal/raw_logging.h" | 54 | #include "absl/base/internal/raw_logging.h" |
| 55 | #include "absl/base/macros.h" | 55 | #include "absl/base/macros.h" |
| 56 | @@ -55,8 +59,10 @@ void* GetProgramCounter(void* vuc) { | 56 | @@ -63,8 +67,10 @@ void* GetProgramCounter(void* vuc) { |
| 57 | return reinterpret_cast<void*>(context->uc_mcontext.pc); | 57 | return reinterpret_cast<void*>(context->uc_mcontext.pc); |
| 58 | #elif defined(__powerpc64__) | 58 | #elif defined(__powerpc64__) |
| 59 | return reinterpret_cast<void*>(context->uc_mcontext.gp_regs[32]); | 59 | return reinterpret_cast<void*>(context->uc_mcontext.gp_regs[32]); |
| 60 | -#elif defined(__powerpc__) | 60 | -#elif defined(__powerpc__) |
| 61 | +#elif defined(__powerpc__) && defined(__GLIBC__) | 61 | +#elif defined(__powerpc__) && defined(__GLIBC__) |
| 62 | return reinterpret_cast<void*>(context->uc_mcontext.regs->nip); | 62 | return reinterpret_cast<void*>(context->uc_mcontext.uc_regs->gregs[32]); |
| 63 | +#elif defined(__powerpc__) | 63 | +#elif defined(__powerpc__) |
| 64 | + return reinterpret_cast<void*>(((struct pt_regs *)context->uc_regs)->nip); | 64 | + return reinterpret_cast<void*>(((struct pt_regs *)context->uc_regs)->gregs[32]); |
| 65 | #elif defined(__riscv) | 65 | #elif defined(__riscv) |
| 66 | return reinterpret_cast<void*>(context->uc_mcontext.__gregs[REG_PC]); | 66 | return reinterpret_cast<void*>(context->uc_mcontext.__gregs[REG_PC]); |
| 67 | #elif defined(__s390__) && !defined(__s390x__) | 67 | #elif defined(__s390__) && !defined(__s390x__) |
| 68 | --- a/absl/debugging/internal/stacktrace_config.h | 68 | --- a/absl/debugging/internal/stacktrace_config.h |
| 69 | +++ b/absl/debugging/internal/stacktrace_config.h | 69 | +++ b/absl/debugging/internal/stacktrace_config.h |
| 70 | @@ -64,7 +64,7 @@ | 70 | @@ -55,7 +55,7 @@ |
| 71 | #elif defined(__i386__) || defined(__x86_64__) | 71 | #elif defined(__i386__) || defined(__x86_64__) |
| 72 | #define ABSL_STACKTRACE_INL_HEADER \ | 72 | #define ABSL_STACKTRACE_INL_HEADER \ |
| 73 | "absl/debugging/internal/stacktrace_x86-inl.inc" | 73 | "absl/debugging/internal/stacktrace_x86-inl.inc" |
| @@ -76,19 +76,3 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
| 76 | #define ABSL_STACKTRACE_INL_HEADER \ | 76 | #define ABSL_STACKTRACE_INL_HEADER \ |
| 77 | "absl/debugging/internal/stacktrace_powerpc-inl.inc" | 77 | "absl/debugging/internal/stacktrace_powerpc-inl.inc" |
| 78 | #elif defined(__aarch64__) | 78 | #elif defined(__aarch64__) |
| 79 | --- a/absl/debugging/internal/stacktrace_powerpc-inl.inc | ||
| 80 | +++ b/absl/debugging/internal/stacktrace_powerpc-inl.inc | ||
| 81 | @@ -130,8 +130,13 @@ static void **NextStackFrame(void **old_ | ||
| 82 | StacktracePowerPCGetLR(new_sp) == kernel_sigtramp_rt64_address) { | ||
| 83 | const ucontext_t* signal_context = | ||
| 84 | reinterpret_cast<const ucontext_t*>(uc); | ||
| 85 | +#if defined(__powerpc64__) | ||
| 86 | void **const sp_before_signal = | ||
| 87 | reinterpret_cast<void**>(signal_context->uc_mcontext.gp_regs[PT_R1]); | ||
| 88 | +#else | ||
| 89 | + void **const sp_before_signal = | ||
| 90 | + reinterpret_cast<void**>(signal_context->uc_mcontext.uc_regs->gregs[PT_R1]); | ||
| 91 | +#endif | ||
| 92 | // Check that alleged sp before signal is nonnull and is reasonably | ||
| 93 | // aligned. | ||
| 94 | if (sp_before_signal != nullptr && | ||
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb index 903b7b4b82..01dd9f550e 100644 --- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb | |||
| @@ -7,13 +7,14 @@ SECTION = "libs" | |||
| 7 | LICENSE = "Apache-2.0" | 7 | LICENSE = "Apache-2.0" |
| 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915" | 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915" |
| 9 | 9 | ||
| 10 | PV = "20200923+git${SRCPV}" | 10 | PV = "20210324+git${SRCPV}" |
| 11 | SRCREV = "6f9d96a1f41439ac172ee2ef7ccd8edf0e5d068c" | 11 | SRCREV = "e1d388e7e74803050423d035e4374131b9b57919" |
| 12 | BRANCH = "lts_2020_09_23" | 12 | BRANCH = "lts_2021_03_24" |
| 13 | SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH} \ | 13 | SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH} \ |
| 14 | file://0001-absl-always-use-asm-sgidefs.h.patch \ | 14 | file://0001-absl-always-use-asm-sgidefs.h.patch \ |
| 15 | file://0002-Remove-maes-option-from-cross-compilation.patch \ | 15 | file://0002-Remove-maes-option-from-cross-compilation.patch \ |
| 16 | file://abseil-ppc-fixes.patch \ | 16 | file://abseil-ppc-fixes.patch \ |
| 17 | file://0001-Export-of-internal-Abseil-changes.patch \ | ||
| 17 | " | 18 | " |
| 18 | 19 | ||
| 19 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |
| @@ -30,5 +31,4 @@ EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON \ | |||
| 30 | 31 | ||
| 31 | BBCLASSEXTEND = "native nativesdk" | 32 | BBCLASSEXTEND = "native nativesdk" |
| 32 | 33 | ||
| 33 | FILES_${PN} = "${libdir}/libabsl_*.so" | 34 | FILES_${PN}-dev += "${includedir} ${libdir}/cmake ${libdir}/pkgconfig" |
| 34 | FILES_${PN}-dev = "${includedir} ${libdir}/cmake" | ||
