blob: 63b78a8a30c023a0bb2308c018db1048a7662394 [file] [log] [blame]
Andrew Geissler4ed12e12020-06-05 18:00:41 -05001From 49b21f0fe5fb93b30b94cc449429fd33de0652a7 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Thu, 18 Aug 2016 14:46:32 +0100
4Subject: [PATCH] If you:
Patrick Williamsc0f7c042017-02-23 20:41:17 -06005
6TCLIBC=musl bitbake unwind
7TCLIBC=musl bitbake gcc-runtime -c cleansstate
8TCLIBC=musl bitbake gcc-runtime
9
10you will see libstdc++ fail to build due to finding libunwind's header file.
11
Andrew Geissler4ed12e12020-06-05 18:00:41 -050012Khem: "When we build any of gcc components they expect to use internal version
13and that works with glibc based gcc since the search headers first look into gcc
14headers, however with musl the gcc headers are searched after the standard
Patrick Williamsc0f7c042017-02-23 20:41:17 -060015headers ( which is by design the right thing )."
16
Andrew Geissler4ed12e12020-06-05 18:00:41 -050017This patch hacks around the issue by looking for a define used during gcc-runtime's
Patrick Williamsc0f7c042017-02-23 20:41:17 -060018build and skipping to the internal header in that case.
19
20[YOCTO #10129]
21
22RP 2016/8/18
23
24Upstream-Status: Inappropriate [really need to fix gcc]
25
Andrew Geissler4ed12e12020-06-05 18:00:41 -050026---
27 include/unwind.h | 4 ++++
28 1 file changed, 4 insertions(+)
29
30diff --git a/include/unwind.h b/include/unwind.h
31index 7cf128d..31c2871 100644
32--- a/include/unwind.h
33+++ b/include/unwind.h
34@@ -23,6 +23,10 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
Patrick Williamsc0f7c042017-02-23 20:41:17 -060035 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
36 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
37
38+#ifdef _GLIBCXX_SHARED
39+#include_next <unwind.h>
40+#endif
41+
42 #ifndef _UNWIND_H
43 #define _UNWIND_H
44