aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/abseil-cpp
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-02-16 16:29:36 -0800
committerKhem Raj <raj.khem@gmail.com>2020-02-16 23:32:52 -0800
commit497aa40527a04a5be029ab720682a80762f63611 (patch)
tree9e9d8ba236613e619bb218269feebb45a88ad3ac /meta-oe/recipes-devtools/abseil-cpp
parent3dbcc5dc3ea095c115f539192873bfb71641ac96 (diff)
downloadmeta-openembedded-497aa40527a04a5be029ab720682a80762f63611.tar.gz
abseil-cpp: Fix build on risc-v
Port GetProgramCounter to support risc-v program counter 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_git.bb1
2 files changed, 30 insertions, 0 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
new file mode 100644
index 000000000..95ec070f6
--- /dev/null
+++ b/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-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
index 77afba8de..4d1636107 100644
--- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
+++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
@@ -13,6 +13,7 @@ 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 \
"
S = "${WORKDIR}/git"