1From e1de5a5b42062dc02769f320c7785928b2ee0c57 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: 5 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 12Khem: "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 15headers ( which is by design the right thing )." 16 17This patch hacks around the issue by looking for a define used during gcc-runtime's 18build 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 26--- 27 include/unwind.h | 4 ++++ 28 1 file changed, 4 insertions(+) 29 30diff --git a/include/unwind.h b/include/unwind.h 31index 93780fa..c812414 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 35 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 45