summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/abseil-cpp
diff options
context:
space:
mode:
authorClément Péron <peron.clem@gmail.com>2021-01-26 10:24:05 +0100
committerKhem Raj <raj.khem@gmail.com>2021-01-27 10:21:14 -0800
commitce9fa374e134040f60d199448340c04c89d2ec85 (patch)
treec68e2154f66b0b6075f6cc3b37e8634fe11baf21 /meta-oe/recipes-devtools/abseil-cpp
parent486d0fa33ec6dc41f198445180135ccccb897ce1 (diff)
downloadmeta-openembedded-ce9fa374e134040f60d199448340c04c89d2ec85.tar.gz
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. Signed-off-by: Clément Péron <peron.clem@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/abseil-cpp')
-rw-r--r--meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Add-RISCV-support-to-GetProgramCounter.patch29
-rw-r--r--meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Fix-build-on-riscv32.patch74
-rw-r--r--meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Remove-maes-option-from-cross-compilation.patch53
-rw-r--r--meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch8
-rw-r--r--meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Add-forgotten-ABSL_HAVE_VDSO_SUPPORT-conditional.patch35
-rw-r--r--meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch37
-rw-r--r--meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Add-fPIC-option.patch27
-rw-r--r--meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb24
8 files changed, 54 insertions, 233 deletions
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Add-RISCV-support-to-GetProgramCounter.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Add-RISCV-support-to-GetProgramCounter.patch
deleted file mode 100644
index 95ec070f6c..0000000000
--- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Add-RISCV-support-to-GetProgramCounter.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 983eeae0792946fe5c090f95164c892ec6db5cc4 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 16 Feb 2020 16:22:53 -0800
4Subject: [PATCH] Add RISCV support to GetProgramCounter()
5
6Identify PC register from signal context
7
8Upstream-Status: Submitted [https://github.com/abseil/abseil-cpp/pull/621]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 absl/debugging/internal/examine_stack.cc | 2 ++
12 1 file changed, 2 insertions(+)
13
14diff --git a/absl/debugging/internal/examine_stack.cc b/absl/debugging/internal/examine_stack.cc
15index 4739fbc..fb77450 100644
16--- a/absl/debugging/internal/examine_stack.cc
17+++ b/absl/debugging/internal/examine_stack.cc
18@@ -53,6 +53,8 @@ void* GetProgramCounter(void* vuc) {
19 return reinterpret_cast<void*>(context->uc_mcontext.gp_regs[32]);
20 #elif defined(__powerpc__)
21 return reinterpret_cast<void*>(context->uc_mcontext.regs->nip);
22+#elif defined(__riscv)
23+ return reinterpret_cast<void*>(context->uc_mcontext.__gregs[REG_PC]);
24 #elif defined(__s390__) && !defined(__s390x__)
25 return reinterpret_cast<void*>(context->uc_mcontext.psw.addr & 0x7fffffff);
26 #elif defined(__s390__) && defined(__s390x__)
27--
282.25.0
29
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Fix-build-on-riscv32.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Fix-build-on-riscv32.patch
deleted file mode 100644
index e7c9b43c29..0000000000
--- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Fix-build-on-riscv32.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1From 04e28fdda03b545a0f7b446a784ec2fa7249cbb8 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 29 Apr 2020 15:37:40 -0700
4Subject: [PATCH] Fix build on riscv32
5
6Define __NR_mmap in terms of __NR_mmap2 and __NR_futex interms of
7__NR_futex_time64 for rv32, since there calls dont exist for rv32
8
9Also recognise rv32 as a new 32bit platform
10
11Upstream-Status: Submitted [https://github.com/abseil/abseil-cpp/pull/675]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 absl/base/internal/direct_mmap.h | 5 +++++
15 absl/base/internal/spinlock_linux.inc | 4 ++++
16 absl/synchronization/internal/waiter.cc | 4 ++++
17 3 files changed, 13 insertions(+)
18
19diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h
20index 5618867..90cfeca 100644
21--- a/absl/base/internal/direct_mmap.h
22+++ b/absl/base/internal/direct_mmap.h
23@@ -26,6 +26,10 @@
24
25 #ifdef __linux__
26
27+#if !defined(__NR_mmap) && defined(__riscv) && __riscv_xlen == 32
28+# define __NR_mmap __NR_mmap2
29+#endif
30+
31 #include <sys/types.h>
32 #ifdef __BIONIC__
33 #include <sys/syscall.h>
34@@ -72,6 +76,7 @@ inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd,
35 #if defined(__i386__) || defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \
36 (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) || \
37 (defined(__PPC__) && !defined(__PPC64__)) || \
38+ (defined(__riscv) && __riscv_xlen == 32) || \
39 (defined(__s390__) && !defined(__s390x__))
40 // On these architectures, implement mmap with mmap2.
41 static int pagesize = 0;
42diff --git a/absl/base/internal/spinlock_linux.inc b/absl/base/internal/spinlock_linux.inc
43index 323edd6..3dca444 100644
44--- a/absl/base/internal/spinlock_linux.inc
45+++ b/absl/base/internal/spinlock_linux.inc
46@@ -14,6 +14,10 @@
47 //
48 // This file is a Linux-specific part of spinlock_wait.cc
49
50+#if !defined(__NR_futex) && defined(__riscv) && __riscv_xlen == 32
51+# define __NR_futex __NR_futex_time64
52+#endif
53+
54 #include <linux/futex.h>
55 #include <sys/syscall.h>
56 #include <unistd.h>
57diff --git a/absl/synchronization/internal/waiter.cc b/absl/synchronization/internal/waiter.cc
58index 2949f5a..7411042 100644
59--- a/absl/synchronization/internal/waiter.cc
60+++ b/absl/synchronization/internal/waiter.cc
61@@ -24,6 +24,10 @@
62 #include <unistd.h>
63 #endif
64
65+#if !defined(__NR_futex) && defined(__riscv) && __riscv_xlen == 32
66+# define __NR_futex __NR_futex_time64
67+#endif
68+
69 #ifdef __linux__
70 #include <linux/futex.h>
71 #include <sys/syscall.h>
72--
732.26.2
74
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Remove-maes-option-from-cross-compilation.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Remove-maes-option-from-cross-compilation.patch
deleted file mode 100644
index 4c41cd8902..0000000000
--- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Remove-maes-option-from-cross-compilation.patch
+++ /dev/null
@@ -1,53 +0,0 @@
1From 70926666f7c5c35add363e3bcade6eaabace7206 Mon Sep 17 00:00:00 2001
2From: Sinan Kaya <sinan.kaya@microsoft.com>
3Date: Mon, 3 Feb 2020 03:25:57 +0000
4Subject: [PATCH] Remove maes option from cross-compilation
5
6---
7 absl/copts/GENERATED_AbseilCopts.cmake | 4 ----
8 absl/copts/GENERATED_copts.bzl | 4 ----
9 absl/copts/copts.py | 4 ----
10 3 files changed, 12 deletions(-)
11
12diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake
13index 01bd40b..af99694 100644
14--- a/absl/copts/GENERATED_AbseilCopts.cmake
15+++ b/absl/copts/GENERATED_AbseilCopts.cmake
16@@ -230,7 +230,3 @@ list(APPEND ABSL_RANDOM_HWAES_MSVC_X64_FLAGS
17 "/Ob2"
18 )
19
20-list(APPEND ABSL_RANDOM_HWAES_X64_FLAGS
21- "-maes"
22- "-msse4.1"
23-)
24diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl
25index 82f332f..9a548d1 100644
26--- a/absl/copts/GENERATED_copts.bzl
27+++ b/absl/copts/GENERATED_copts.bzl
28@@ -231,7 +231,3 @@ ABSL_RANDOM_HWAES_MSVC_X64_FLAGS = [
29 "/Ob2",
30 ]
31
32-ABSL_RANDOM_HWAES_X64_FLAGS = [
33- "-maes",
34- "-msse4.1",
35-]
36diff --git a/absl/copts/copts.py b/absl/copts/copts.py
37index 068abce..c2f70fb 100644
38--- a/absl/copts/copts.py
39+++ b/absl/copts/copts.py
40@@ -203,10 +203,6 @@ COPT_VARS = {
41 # to improve performance of some random bit generators.
42 "ABSL_RANDOM_HWAES_ARM64_FLAGS": ["-march=armv8-a+crypto"],
43 "ABSL_RANDOM_HWAES_ARM32_FLAGS": ["-mfpu=neon"],
44- "ABSL_RANDOM_HWAES_X64_FLAGS": [
45- "-maes",
46- "-msse4.1",
47- ],
48 "ABSL_RANDOM_HWAES_MSVC_X64_FLAGS": [
49 "/O2", # Maximize speed
50 "/Ob2", # Aggressive inlining
51--
522.23.0
53
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 6bb59d9336..2bafcc6b13 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 @@
1From 14229e8c6f42a96e4d725124193ceefa54e5e1a4 Mon Sep 17 00:00:00 2001 1From 8f21fdfb83b0fa844a9f1f03a86a9ca46642d85e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 9 Apr 2020 13:06:27 -0700 3Date: Thu, 9 Apr 2020 13:06:27 -0700
4Subject: [PATCH] absl: always use <asm/sgidefs.h> 4Subject: [PATCH 1/2] absl: always use <asm/sgidefs.h>
5 5
6Fixes mips/musl build, since sgidefs.h is not present on all C libraries 6Fixes mips/musl build, since sgidefs.h is not present on all C libraries
7but on linux asm/sgidefs.h is there and contains same definitions, using 7but on linux asm/sgidefs.h is there and contains same definitions, using
@@ -15,7 +15,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
15 1 file changed, 1 insertion(+), 5 deletions(-) 15 1 file changed, 1 insertion(+), 5 deletions(-)
16 16
17diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h 17diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h
18index 2e5e422..c515325 100644 18index 16accf096604..ba7936cc934e 100644
19--- a/absl/base/internal/direct_mmap.h 19--- a/absl/base/internal/direct_mmap.h
20+++ b/absl/base/internal/direct_mmap.h 20+++ b/absl/base/internal/direct_mmap.h
21@@ -41,13 +41,9 @@ 21@@ -41,13 +41,9 @@
@@ -34,5 +34,5 @@ index 2e5e422..c515325 100644
34 34
35 // SYS_mmap and SYS_munmap are not defined in Android. 35 // SYS_mmap and SYS_munmap are not defined in Android.
36-- 36--
372.26.0 372.25.1
38 38
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Add-forgotten-ABSL_HAVE_VDSO_SUPPORT-conditional.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Add-forgotten-ABSL_HAVE_VDSO_SUPPORT-conditional.patch
deleted file mode 100644
index fab4a738ea..0000000000
--- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Add-forgotten-ABSL_HAVE_VDSO_SUPPORT-conditional.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1From 9384735383a0b8688e3f05ed23a53f18863eae20 Mon Sep 17 00:00:00 2001
2From: Sinan Kaya <sinan.kaya@microsoft.com>
3Date: Tue, 11 Feb 2020 11:36:00 -0500
4Subject: [PATCH] Add forgotten ABSL_HAVE_VDSO_SUPPORT conditional
5
6Signed-off-by: Sinan Kaya <sinan.kaya@microsoft.com>
7---
8 absl/debugging/internal/stacktrace_x86-inl.inc | 4 ++++
9 1 file changed, 4 insertions(+)
10
11diff --git a/absl/debugging/internal/stacktrace_x86-inl.inc b/absl/debugging/internal/stacktrace_x86-inl.inc
12index ff0fd31..28607c3 100644
13--- a/absl/debugging/internal/stacktrace_x86-inl.inc
14+++ b/absl/debugging/internal/stacktrace_x86-inl.inc
15@@ -171,6 +171,7 @@ static void **NextStackFrame(void **old_fp, const void *uc) {
16 static const unsigned char *kernel_rt_sigreturn_address = nullptr;
17 static const unsigned char *kernel_vsyscall_address = nullptr;
18 if (num_push_instructions == -1) {
19+#ifdef ABSL_HAVE_VDSO_SUPPORT
20 absl::debugging_internal::VDSOSupport vdso;
21 if (vdso.IsPresent()) {
22 absl::debugging_internal::VDSOSupport::SymbolInfo
23@@ -199,6 +200,9 @@ static void **NextStackFrame(void **old_fp, const void *uc) {
24 } else {
25 num_push_instructions = 0;
26 }
27+#else
28+ num_push_instructions = 0;
29+#endif
30 }
31 if (num_push_instructions != 0 && kernel_rt_sigreturn_address != nullptr &&
32 old_fp[1] == kernel_rt_sigreturn_address) {
33--
342.20.1.windows.1
35
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
new file mode 100644
index 0000000000..da9dbd9367
--- /dev/null
+++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch
@@ -0,0 +1,37 @@
1From a9e15a4855c82eb948dedeecd83d5e17c3c8f767 Mon Sep 17 00:00:00 2001
2From: Sinan Kaya <sinan.kaya@microsoft.com>
3Date: Mon, 3 Feb 2020 03:25:57 +0000
4Subject: [PATCH 2/2] Remove maes option from cross-compilation
5
6---
7 absl/copts/GENERATED_AbseilCopts.cmake | 4 ----
8 absl/copts/GENERATED_copts.bzl | 4 ----
9 2 files changed, 8 deletions(-)
10
11diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake
12index 97bd283eb739..ce29ac031b9c 100644
13--- a/absl/copts/GENERATED_AbseilCopts.cmake
14+++ b/absl/copts/GENERATED_AbseilCopts.cmake
15@@ -210,7 +210,3 @@ list(APPEND ABSL_RANDOM_HWAES_ARM64_FLAGS
16 list(APPEND ABSL_RANDOM_HWAES_MSVC_X64_FLAGS
17 )
18
19-list(APPEND ABSL_RANDOM_HWAES_X64_FLAGS
20- "-maes"
21- "-msse4.1"
22-)
23diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl
24index bcdd61ef8211..3e8eddd4bb08 100644
25--- a/absl/copts/GENERATED_copts.bzl
26+++ b/absl/copts/GENERATED_copts.bzl
27@@ -211,7 +211,3 @@ ABSL_RANDOM_HWAES_ARM64_FLAGS = [
28 ABSL_RANDOM_HWAES_MSVC_X64_FLAGS = [
29 ]
30
31-ABSL_RANDOM_HWAES_X64_FLAGS = [
32- "-maes",
33- "-msse4.1",
34-]
35--
362.25.1
37
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Add-fPIC-option.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Add-fPIC-option.patch
deleted file mode 100644
index bb78813a7f..0000000000
--- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Add-fPIC-option.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From d7160d647c8f8847f3ea8d7b0eb222936962c1af Mon Sep 17 00:00:00 2001
2From: Sinan Kaya <sinan.kaya@microsoft.com>
3Date: Tue, 11 Feb 2020 11:58:02 -0500
4Subject: [PATCH] Add fPIC option
5
6Signed-off-by: Sinan Kaya <sinan.kaya@microsoft.com>
7---
8 CMakeLists.txt | 3 +++
9 1 file changed, 3 insertions(+)
10
11diff --git a/CMakeLists.txt b/CMakeLists.txt
12index 74a3a4c..4f837b3 100644
13--- a/CMakeLists.txt
14+++ b/CMakeLists.txt
15@@ -79,6 +79,9 @@ option(ABSL_USE_GOOGLETEST_HEAD
16
17 option(ABSL_RUN_TESTS "If ON, Abseil tests will be run." OFF)
18
19+# link fails on arm64 and x86-64 without this
20+add_compile_options(-fPIC)
21+
22 if(${ABSL_RUN_TESTS})
23 # enable CTest. This will set BUILD_TESTING to ON unless otherwise specified
24 # on the command line
25--
262.20.1.windows.1
27
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 8efa31e953..cc7bf01d73 100644
--- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
+++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
@@ -7,16 +7,12 @@ SECTION = "libs"
7LICENSE = "Apache-2.0" 7LICENSE = "Apache-2.0"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915" 8LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915"
9 9
10PV = "20190808+git${SRCPV}" 10PV = "20200923+git${SRCPV}"
11SRCREV = "aa844899c937bde5d2b24f276b59997e5b668bde" 11SRCREV = "6f9d96a1f41439ac172ee2ef7ccd8edf0e5d068c"
12BRANCH = "lts_2019_08_08" 12BRANCH = "lts_2020_09_23"
13SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH} \ 13SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH} \
14 file://0001-Remove-maes-option-from-cross-compilation.patch \ 14 file://0001-absl-always-use-asm-sgidefs.h.patch \
15 file://0002-Add-forgotten-ABSL_HAVE_VDSO_SUPPORT-conditional.patch \ 15 file://0002-Remove-maes-option-from-cross-compilation.patch \
16 file://0003-Add-fPIC-option.patch \
17 file://0001-Add-RISCV-support-to-GetProgramCounter.patch \
18 file://0001-absl-always-use-asm-sgidefs.h.patch \
19 file://0001-Fix-build-on-riscv32.patch \
20 " 16 "
21 17
22S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
@@ -28,9 +24,16 @@ ASNEEDED_class-nativesdk = ""
28 24
29inherit cmake 25inherit cmake
30 26
27EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON \
28 -DBUILD_TESTING=OFF \
29 "
30
31BBCLASSEXTEND = "native nativesdk" 31BBCLASSEXTEND = "native nativesdk"
32ALLOW_EMPTY_${PN} = "1" 32ALLOW_EMPTY_${PN} = "1"
33 33
34FILES_${PN} = "${libdir}/libabsl_*.so ${libdir}/cmake"
35FILES_${PN}-dev = "${includedir}"
36
34python () { 37python () {
35 arch = d.getVar("TARGET_ARCH") 38 arch = d.getVar("TARGET_ARCH")
36 39
@@ -55,4 +58,3 @@ python () {
55 raise bb.parse.SkipRecipe("%s-%s Needs support for corei7 on x86_64" % (pkgn, pkgv)) 58 raise bb.parse.SkipRecipe("%s-%s Needs support for corei7 on x86_64" % (pkgn, pkgv))
56 59
57} 60}
58