Andrew Geissler | 4ed12e1 | 2020-06-05 18:00:41 -0500 | [diff] [blame^] | 1 | From 49b21f0fe5fb93b30b94cc449429fd33de0652a7 Mon Sep 17 00:00:00 2001 |
| 2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> |
| 3 | Date: Thu, 18 Aug 2016 14:46:32 +0100 |
| 4 | Subject: [PATCH] If you: |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 5 | |
| 6 | TCLIBC=musl bitbake unwind |
| 7 | TCLIBC=musl bitbake gcc-runtime -c cleansstate |
| 8 | TCLIBC=musl bitbake gcc-runtime |
| 9 | |
| 10 | you will see libstdc++ fail to build due to finding libunwind's header file. |
| 11 | |
Andrew Geissler | 4ed12e1 | 2020-06-05 18:00:41 -0500 | [diff] [blame^] | 12 | Khem: "When we build any of gcc components they expect to use internal version |
| 13 | and that works with glibc based gcc since the search headers first look into gcc |
| 14 | headers, however with musl the gcc headers are searched after the standard |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 15 | headers ( which is by design the right thing )." |
| 16 | |
Andrew Geissler | 4ed12e1 | 2020-06-05 18:00:41 -0500 | [diff] [blame^] | 17 | This patch hacks around the issue by looking for a define used during gcc-runtime's |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 18 | build and skipping to the internal header in that case. |
| 19 | |
| 20 | [YOCTO #10129] |
| 21 | |
| 22 | RP 2016/8/18 |
| 23 | |
| 24 | Upstream-Status: Inappropriate [really need to fix gcc] |
| 25 | |
Andrew Geissler | 4ed12e1 | 2020-06-05 18:00:41 -0500 | [diff] [blame^] | 26 | --- |
| 27 | include/unwind.h | 4 ++++ |
| 28 | 1 file changed, 4 insertions(+) |
| 29 | |
| 30 | diff --git a/include/unwind.h b/include/unwind.h |
| 31 | index 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 Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 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 | |