Skip to contentSkip to conversation

abseil-cpp: bump to LTS 2020_09_23 Patch Release 3

PATCH New Clément Péron 1 participant 1 message Jan 26, 2021 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 abseil-cpp: bump to LTS 2020_09_23 Patch Release 3

Most patches have been upstreamed and accepted.

We can drop the -fPIC patch and pass BUILD_SHARED_LIBS instead.

---

Changes since v2:
- Missing FILES_${PN} to filter out .so files

Changes since v1:
- SRC_URI fix mixup between 0001 and 0002 patches name

 ...d-RISCV-support-to-GetProgramCounter.patch | 29 --------
 .../0001-Fix-build-on-riscv32.patch           | 74 -------------------
 ...e-maes-option-from-cross-compilation.patch | 53 -------------
 .../0001-absl-always-use-asm-sgidefs.h.patch  |  8 +-
 ...n-ABSL_HAVE_VDSO_SUPPORT-conditional.patch | 35 ---------
 ...e-maes-option-from-cross-compilation.patch | 37 ++++++++++
 .../abseil-cpp/0003-Add-fPIC-option.patch     | 27 -------
 .../abseil-cpp/abseil-cpp_git.bb              | 24 +++---
 8 files changed, 54 insertions(+), 233 deletions(-)
 delete mode 100644 meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Add-RISCV-support-to-GetProgramCounter.patch
 delete mode 100644 meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Fix-build-on-riscv32.patch
 delete mode 100644 meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Remove-maes-option-from-cross-compilation.patch
 delete mode 100644 meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Add-forgotten-ABSL_HAVE_VDSO_SUPPORT-conditional.patch
 create mode 100644 meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch
 delete mode 100644 meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Add-fPIC-option.patch
meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Add-RISCV-support-to-GetProgramCounter.patch deleted +0 -29
deleted file mode 100644
index 95ec070f6c5a..000000000000
@@ -1,29 +0,0 @@
-From 983eeae0792946fe5c090f95164c892ec6db5cc4 Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Sun, 16 Feb 2020 16:22:53 -0800
-Subject: [PATCH] Add RISCV support to GetProgramCounter()
-
-Identify PC register from signal context
-
-Upstream-Status: Submitted [https://github.com/abseil/abseil-cpp/pull/621]
-Signed-off-by: Khem Raj <[email protected]>
----
- absl/debugging/internal/examine_stack.cc | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/absl/debugging/internal/examine_stack.cc b/absl/debugging/internal/examine_stack.cc
-index 4739fbc..fb77450 100644
---- a/absl/debugging/internal/examine_stack.cc
-+++ b/absl/debugging/internal/examine_stack.cc
-@@ -53,6 +53,8 @@ void* GetProgramCounter(void* vuc) {
-     return reinterpret_cast<void*>(context->uc_mcontext.gp_regs[32]);
- #elif defined(__powerpc__)
-     return reinterpret_cast<void*>(context->uc_mcontext.regs->nip);
-+#elif defined(__riscv)
-+    return reinterpret_cast<void*>(context->uc_mcontext.__gregs[REG_PC]);
- #elif defined(__s390__) && !defined(__s390x__)
-     return reinterpret_cast<void*>(context->uc_mcontext.psw.addr & 0x7fffffff);
- #elif defined(__s390__) && defined(__s390x__)
--- 
-2.25.0
-
meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Fix-build-on-riscv32.patch deleted +0 -74

74 lines not on this page · raw message

meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Remove-maes-option-from-cross-compilation.patch deleted +0 -53

53 lines not on this page · raw message

meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch +4 -4
index 6bb59d933694..2bafcc6b1305 100644
@@ -1,7 +1,7 @@
-From 14229e8c6f42a96e4d725124193ceefa54e5e1a4 Mon Sep 17 00:00:00 2001
+From 8f21fdfb83b0fa844a9f1f03a86a9ca46642d85e Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Thu, 9 Apr 2020 13:06:27 -0700
-Subject: [PATCH] absl: always use <asm/sgidefs.h>
+Subject: [PATCH 1/2] 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
@@ -15,7 +15,7 @@ Signed-off-by: Khem Raj <[email protected]>
  1 file changed, 1 insertion(+), 5 deletions(-)
 
 diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h
-index 2e5e422..c515325 100644
+index 16accf096604..ba7936cc934e 100644
 --- a/absl/base/internal/direct_mmap.h
 +++ b/absl/base/internal/direct_mmap.h
 @@ -41,13 +41,9 @@
@@ -34,5 +34,5 @@ index 2e5e422..c515325 100644
  
  // SYS_mmap and SYS_munmap are not defined in Android.
 -- 
-2.26.0
+2.25.1
 
meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Add-forgotten-ABSL_HAVE_VDSO_SUPPORT-conditional.patch deleted +0 -35
deleted file mode 100644
index fab4a738ea74..000000000000
@@ -1,35 +0,0 @@
-From 9384735383a0b8688e3f05ed23a53f18863eae20 Mon Sep 17 00:00:00 2001
-From: Sinan Kaya <[email protected]>
-Date: Tue, 11 Feb 2020 11:36:00 -0500
-Subject: [PATCH] Add forgotten ABSL_HAVE_VDSO_SUPPORT conditional
-
-Signed-off-by: Sinan Kaya <[email protected]>
----
- absl/debugging/internal/stacktrace_x86-inl.inc | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/absl/debugging/internal/stacktrace_x86-inl.inc b/absl/debugging/internal/stacktrace_x86-inl.inc
-index ff0fd31..28607c3 100644
---- a/absl/debugging/internal/stacktrace_x86-inl.inc
-+++ b/absl/debugging/internal/stacktrace_x86-inl.inc
-@@ -171,6 +171,7 @@ static void **NextStackFrame(void **old_fp, const void *uc) {
-     static const unsigned char *kernel_rt_sigreturn_address = nullptr;
-     static const unsigned char *kernel_vsyscall_address = nullptr;
-     if (num_push_instructions == -1) {
-+#ifdef ABSL_HAVE_VDSO_SUPPORT
-       absl::debugging_internal::VDSOSupport vdso;
-       if (vdso.IsPresent()) {
-         absl::debugging_internal::VDSOSupport::SymbolInfo
-@@ -199,6 +200,9 @@ static void **NextStackFrame(void **old_fp, const void *uc) {
-       } else {
-         num_push_instructions = 0;
-       }
-+#else
-+      num_push_instructions = 0;
-+#endif
-     }
-     if (num_push_instructions != 0 && kernel_rt_sigreturn_address != nullptr &&
-         old_fp[1] == kernel_rt_sigreturn_address) {
--- 
-2.20.1.windows.1
-
meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch new file +37 -0
new file mode 100644
index 000000000000..da9dbd936761
@@ -0,0 +1,37 @@
+From a9e15a4855c82eb948dedeecd83d5e17c3c8f767 Mon Sep 17 00:00:00 2001
+From: Sinan Kaya <[email protected]>
+Date: Mon, 3 Feb 2020 03:25:57 +0000
+Subject: [PATCH 2/2] Remove maes option from cross-compilation
+
+---
+ 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
+--- a/absl/copts/GENERATED_AbseilCopts.cmake
++++ b/absl/copts/GENERATED_AbseilCopts.cmake
+@@ -210,7 +210,3 @@ list(APPEND ABSL_RANDOM_HWAES_ARM64_FLAGS
+ list(APPEND ABSL_RANDOM_HWAES_MSVC_X64_FLAGS
+ )
+ 
+-list(APPEND ABSL_RANDOM_HWAES_X64_FLAGS
+-    "-maes"
+-    "-msse4.1"
+-)
+diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl
+index bcdd61ef8211..3e8eddd4bb08 100644
+--- a/absl/copts/GENERATED_copts.bzl
++++ b/absl/copts/GENERATED_copts.bzl
+@@ -211,7 +211,3 @@ ABSL_RANDOM_HWAES_ARM64_FLAGS = [
+ ABSL_RANDOM_HWAES_MSVC_X64_FLAGS = [
+ ]
+ 
+-ABSL_RANDOM_HWAES_X64_FLAGS = [
+-    "-maes",
+-    "-msse4.1",
+-]
+-- 
+2.25.1
+
meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Add-fPIC-option.patch deleted +0 -27
deleted file mode 100644
index bb78813a7fae..000000000000
@@ -1,27 +0,0 @@
-From d7160d647c8f8847f3ea8d7b0eb222936962c1af Mon Sep 17 00:00:00 2001
-From: Sinan Kaya <[email protected]>
-Date: Tue, 11 Feb 2020 11:58:02 -0500
-Subject: [PATCH] Add fPIC option
-
-Signed-off-by: Sinan Kaya <[email protected]>
----
- CMakeLists.txt | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 74a3a4c..4f837b3 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -79,6 +79,9 @@ option(ABSL_USE_GOOGLETEST_HEAD
- 
- option(ABSL_RUN_TESTS "If ON, Abseil tests will be run." OFF)
- 
-+# link fails on arm64 and x86-64 without this
-+add_compile_options(-fPIC)
-+
- if(${ABSL_RUN_TESTS})
-   # enable CTest.  This will set BUILD_TESTING to ON unless otherwise specified
-   # on the command line
--- 
-2.20.1.windows.1
-
meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb +13 -11
index 8efa31e95311..cc7bf01d735a 100644
@@ -7,16 +7,12 @@ SECTION = "libs"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915"
 
-PV = "20190808+git${SRCPV}"
-SRCREV = "aa844899c937bde5d2b24f276b59997e5b668bde"
-BRANCH = "lts_2019_08_08"
-SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH}                \
-           file://0001-Remove-maes-option-from-cross-compilation.patch        \
-           file://0002-Add-forgotten-ABSL_HAVE_VDSO_SUPPORT-conditional.patch \
-           file://0003-Add-fPIC-option.patch                                  \
-           file://0001-Add-RISCV-support-to-GetProgramCounter.patch \
-           file://0001-absl-always-use-asm-sgidefs.h.patch \
-           file://0001-Fix-build-on-riscv32.patch \
+PV = "20200923+git${SRCPV}"
+SRCREV = "6f9d96a1f41439ac172ee2ef7ccd8edf0e5d068c"
+BRANCH = "lts_2020_09_23"
+SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH}         \
+           file://0001-absl-always-use-asm-sgidefs.h.patch             \
+           file://0002-Remove-maes-option-from-cross-compilation.patch \
           "
 
 S = "${WORKDIR}/git"
@@ -28,9 +24,16 @@ ASNEEDED_class-nativesdk = ""
 
 inherit cmake
 
+EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON \
+                 -DBUILD_TESTING=OFF    \
+                "
+
 BBCLASSEXTEND = "native nativesdk"
 ALLOW_EMPTY_${PN} = "1"
 
+FILES_${PN} = "${libdir}/libabsl_*.so ${libdir}/cmake"
+FILES_${PN}-dev = "${includedir}"
+
 python () {
     arch = d.getVar("TARGET_ARCH")
 
@@ -55,4 +58,3 @@ python () {
             raise bb.parse.SkipRecipe("%s-%s Needs support for corei7 on x86_64" % (pkgn, pkgv))
 
 }
-
Signature · 1 line
2.25.1