Skip to content
Snippets Groups Projects
Commit b2cd2565 authored by Bernhard Rosenkränzer's avatar Bernhard Rosenkränzer
Browse files

meta-ohos-core: Fix building bind if _Unwind_GetIP is a macro


bind assumes _Unwind_GetIP is a function; this is not necessarily
true, in some implementations of libunwind (e.g. arm32 version of
gcc builtin) it's a macro.

Signed-off-by: default avatarBernhard Rosenkränzer <bernhard.rosenkraenzer.ext@huawei.com>
parent 6ac2b04a
No related branches found
No related tags found
No related merge requests found
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
From bernhard.rosenkraenzer.ext@huawei.com Tue Jun 29 22:01:00 2021
From: Bernhard Rosenkraenzer <bernhard.rosenkraenzer.ext@huawei.com>
Date: Tue, 29 Jun 2021 22:01:00 +0100
Subject: [PATCH] Don't assume libunwind implementation details
lib/isc/backtrace.c currently assumes _Unwind_Backtrace and _Unwind_GetIP are
implemented as functions.
This is not always true -- some versions of libunwind (such as the 32-bit ARM
implementation built into some versions of gcc) implement _Unwind_GetIP as a
macro, resulting in an undefined reference to _Unwind_GetIP instead of
expanding the macro.
Signed-off-by: Bernhard Rosenkraenzer <bernhard.rosenkraenzer.ext@huawei.com>
Upstream-Status: Pending
diff -up bind-9.11.32/lib/isc/backtrace.c.omv~ bind-9.11.32/lib/isc/backtrace.c
--- bind-9.11.32/lib/isc/backtrace.c.omv~ 2021-06-29 21:39:37.700104599 +0200
+++ bind-9.11.32/lib/isc/backtrace.c 2021-06-29 21:39:59.488413798 +0200
@@ -81,8 +81,7 @@ isc_backtrace_gettrace(void **addrs, int
return (ISC_R_SUCCESS);
}
#elif defined(BACKTRACE_GCC)
-extern int _Unwind_Backtrace(void* fn, void* a);
-extern void* _Unwind_GetIP(void* ctx);
+#include <unwind.h>
typedef struct {
void **result;
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://bind-9.11.32-libunwind-header.patch"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment