summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2020-04-13 21:39:40 +0300
committerAndrew Geissler <geissonator@yahoo.com>2020-05-05 16:30:44 +0300
commit82c905dc58a36aeae40b1b273a12f63fb1973cf4 (patch)
tree38caf00263451b5036435cdc36e035b25d32e623 /meta-openembedded/meta-oe/recipes-devtools/abseil-cpp
parent83ecb75644b3d677c274188f9ac0b2374d6f6925 (diff)
downloadopenbmc-82c905dc58a36aeae40b1b273a12f63fb1973cf4.tar.xz
meta-openembedded and poky: subtree updates
Squash of the following due to dependencies among them and OpenBMC changes: meta-openembedded: subtree update:d0748372d2..9201611135 meta-openembedded: subtree update:9201611135..17fd382f34 poky: subtree update:9052e5b32a..2e11d97b6c poky: subtree update:2e11d97b6c..a8544811d7 The change log was too large for the jenkins plugin to handle therefore it has been removed. Here is the first and last commit of each subtree: meta-openembedded:d0748372d2 cppzmq: bump to version 4.6.0 meta-openembedded:17fd382f34 mpv: Remove X11 dependency poky:9052e5b32a package_ipk: Remove pointless comment to trigger rebuild poky:a8544811d7 pbzip2: Fix license warning Change-Id: If0fc6c37629642ee207a4ca2f7aa501a2c673cd6 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-devtools/abseil-cpp')
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Add-RISCV-support-to-GetProgramCounter.patch29
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Remove-maes-option-from-cross-compilation.patch53
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch38
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Add-forgotten-ABSL_HAVE_VDSO_SUPPORT-conditional.patch35
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Add-fPIC-option.patch27
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb57
6 files changed, 239 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Add-RISCV-support-to-GetProgramCounter.patch b/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Add-RISCV-support-to-GetProgramCounter.patch
new file mode 100644
index 000000000..95ec070f6
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Add-RISCV-support-to-GetProgramCounter.patch
@@ -0,0 +1,29 @@
+From 983eeae0792946fe5c090f95164c892ec6db5cc4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
+---
+ 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
+
diff --git a/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Remove-maes-option-from-cross-compilation.patch b/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Remove-maes-option-from-cross-compilation.patch
new file mode 100644
index 000000000..4c41cd890
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Remove-maes-option-from-cross-compilation.patch
@@ -0,0 +1,53 @@
+From 70926666f7c5c35add363e3bcade6eaabace7206 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] Remove maes option from cross-compilation
+
+---
+ absl/copts/GENERATED_AbseilCopts.cmake | 4 ----
+ absl/copts/GENERATED_copts.bzl | 4 ----
+ absl/copts/copts.py | 4 ----
+ 3 files changed, 12 deletions(-)
+
+diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake
+index 01bd40b..af99694 100644
+--- a/absl/copts/GENERATED_AbseilCopts.cmake
++++ b/absl/copts/GENERATED_AbseilCopts.cmake
+@@ -230,7 +230,3 @@ list(APPEND ABSL_RANDOM_HWAES_MSVC_X64_FLAGS
+ "/Ob2"
+ )
+
+-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 82f332f..9a548d1 100644
+--- a/absl/copts/GENERATED_copts.bzl
++++ b/absl/copts/GENERATED_copts.bzl
+@@ -231,7 +231,3 @@ ABSL_RANDOM_HWAES_MSVC_X64_FLAGS = [
+ "/Ob2",
+ ]
+
+-ABSL_RANDOM_HWAES_X64_FLAGS = [
+- "-maes",
+- "-msse4.1",
+-]
+diff --git a/absl/copts/copts.py b/absl/copts/copts.py
+index 068abce..c2f70fb 100644
+--- a/absl/copts/copts.py
++++ b/absl/copts/copts.py
+@@ -203,10 +203,6 @@ COPT_VARS = {
+ # to improve performance of some random bit generators.
+ "ABSL_RANDOM_HWAES_ARM64_FLAGS": ["-march=armv8-a+crypto"],
+ "ABSL_RANDOM_HWAES_ARM32_FLAGS": ["-mfpu=neon"],
+- "ABSL_RANDOM_HWAES_X64_FLAGS": [
+- "-maes",
+- "-msse4.1",
+- ],
+ "ABSL_RANDOM_HWAES_MSVC_X64_FLAGS": [
+ "/O2", # Maximize speed
+ "/Ob2", # Aggressive inlining
+--
+2.23.0
+
diff --git a/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch b/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch
new file mode 100644
index 000000000..6bb59d933
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch
@@ -0,0 +1,38 @@
+From 14229e8c6f42a96e4d725124193ceefa54e5e1a4 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] 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
+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 2e5e422..c515325 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__
+-// 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 // __mips__
+
+ // SYS_mmap and SYS_munmap are not defined in Android.
+--
+2.26.0
+
diff --git a/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Add-forgotten-ABSL_HAVE_VDSO_SUPPORT-conditional.patch b/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Add-forgotten-ABSL_HAVE_VDSO_SUPPORT-conditional.patch
new file mode 100644
index 000000000..fab4a738e
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Add-forgotten-ABSL_HAVE_VDSO_SUPPORT-conditional.patch
@@ -0,0 +1,35 @@
+From 9384735383a0b8688e3f05ed23a53f18863eae20 Mon Sep 17 00:00:00 2001
+From: Sinan Kaya <sinan.kaya@microsoft.com>
+Date: Tue, 11 Feb 2020 11:36:00 -0500
+Subject: [PATCH] Add forgotten ABSL_HAVE_VDSO_SUPPORT conditional
+
+Signed-off-by: Sinan Kaya <sinan.kaya@microsoft.com>
+---
+ 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
+
diff --git a/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Add-fPIC-option.patch b/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Add-fPIC-option.patch
new file mode 100644
index 000000000..bb78813a7
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Add-fPIC-option.patch
@@ -0,0 +1,27 @@
+From d7160d647c8f8847f3ea8d7b0eb222936962c1af Mon Sep 17 00:00:00 2001
+From: Sinan Kaya <sinan.kaya@microsoft.com>
+Date: Tue, 11 Feb 2020 11:58:02 -0500
+Subject: [PATCH] Add fPIC option
+
+Signed-off-by: Sinan Kaya <sinan.kaya@microsoft.com>
+---
+ 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
+
diff --git a/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb b/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
new file mode 100644
index 000000000..9a44133c5
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
@@ -0,0 +1,57 @@
+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"
+HOMEPAGE = "https://abseil.io/"
+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 \
+ "
+
+S = "${WORKDIR}/git"
+
+DEPENDS_append_libc-musl = " libexecinfo "
+
+ASNEEDED_class-native = ""
+ASNEEDED_class-nativesdk = ""
+
+inherit cmake
+
+BBCLASSEXTEND = "native nativesdk"
+ALLOW_EMPTY_${PN} = "1"
+
+python () {
+ arch = d.getVar("TARGET_ARCH")
+
+ if arch == "aarch64":
+ tunes = d.getVar("TUNE_FEATURES")
+ if not tunes:
+ raise bb.parse.SkipPackage("%s-%s Needs support for crypto on armv8" % (pkgn, pkgv))
+ return
+ pkgn = d.getVar("PN")
+ pkgv = d.getVar("PV")
+ if "crypto" not in tunes:
+ raise bb.parse.SkipPackage("%s-%s Needs support for crypto on armv8" % (pkgn, pkgv))
+
+ if arch == "x86_64":
+ tunes = d.getVar("TUNE_FEATURES")
+ if not tunes:
+ raise bb.parse.SkipPackage("%s-%s Needs support for corei7 on x86_64" % (pkgn, pkgv))
+ return
+ pkgn = d.getVar("PN")
+ pkgv = d.getVar("PV")
+ if "corei7" not in tunes:
+ raise bb.parse.SkipPackage("%s-%s Needs support for corei7 on x86_64" % (pkgn, pkgv))
+
+}
+