Skip to content

Commit da587db

Browse files
committed
contrib: fix debian-otel build failure on loongarch64
1 parent 5dd6043 commit da587db

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
From 36c4b7940b84cb809d5d6bf0bc513c9b23834711 Mon Sep 17 00:00:00 2001
2+
From: Ma Aiguo <[email protected]>
3+
Date: Mon, 21 Feb 2022 21:04:57 +0800
4+
Subject: [PATCH] Fit for build on loong64 architecture
5+
6+
---
7+
absl/debugging/internal/examine_stack.cc | 2 ++
8+
1 file changed, 2 insertions(+)
9+
10+
diff --git a/absl/debugging/internal/examine_stack.cc b/absl/debugging/internal/examine_stack.cc
11+
index 589a3ef367d..2fbfea8e53f 100644
12+
--- a/absl/debugging/internal/examine_stack.cc
13+
+++ b/absl/debugging/internal/examine_stack.cc
14+
@@ -82,6 +82,8 @@ void* GetProgramCounter(void* vuc) {
15+
return reinterpret_cast<void*>(context->uc_mcontext.gregs[16]);
16+
#elif defined(__e2k__)
17+
return reinterpret_cast<void*>(context->uc_mcontext.cr0_hi);
18+
+#elif defined(__loongarch__)
19+
+ return reinterpret_cast<void*>(context->uc_mcontext.__pc);
20+
#else
21+
#error "Undefined Architecture."
22+
#endif

contrib/src/abseil-cpp/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ abseil-cpp: abseil-cpp-$(ABSEIL_VERSION).tar.gz .sum-abseil-cpp
1414
$(UNPACK)
1515
$(APPLY) $(SRC)/abseil-cpp/b957f0ccd00481cd4fd663d8320aa02ae0564f18.patch
1616
$(APPLY) $(SRC)/abseil-cpp/4500c2fada4e952037c59bd65e8be1ba0b29f21e.patch
17+
$(APPLY) $(SRC)/abseil-cpp/36c4b7940b84cb809d5d6bf0bc513c9b23834711.patch
1718
$(MOVE)
1819

0 commit comments

Comments
 (0)