summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-18 14:46:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-19 10:23:55 +0100
commitb360310798a30900cc1d398da089bd1a94f20b50 (patch)
tree98720e751c37a3eec783d9fc0616fa0698a4a1f9 /meta/recipes-support
parentc66683671e33c3e5ca804e205c94fabb3e397b66 (diff)
downloadpoky-b360310798a30900cc1d398da089bd1a94f20b50.tar.gz
libunwind: Fix build race conflict with gcc and musl
Building libunwind, then gcc-runtime causes build failures. This is hard to fix since gcc-runtime wants the internal gcc unwind.h header but libunwind wants to provide this. There are differences in include behaviour between gcc and glibc which are by design. This patch hacks around the issue by looking for a define used during gcc-runtime's build and skipping to the internal header in that case. The patch is only enabled on musl and is the best workaround I could come up with to unblock failing builds on our autobuilder. [YOCTO #10129] (From OE-Core rev: cd8b64b0a236b27e5383e2394de65b9bfd4b6677) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r--meta/recipes-support/libunwind/libunwind/musl-header-conflict.patch37
-rw-r--r--meta/recipes-support/libunwind/libunwind_git.bb1
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-support/libunwind/libunwind/musl-header-conflict.patch b/meta/recipes-support/libunwind/libunwind/musl-header-conflict.patch
new file mode 100644
index 0000000000..79f63fd84e
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind/musl-header-conflict.patch
@@ -0,0 +1,37 @@
1If you:
2
3TCLIBC=musl bitbake unwind
4TCLIBC=musl bitbake gcc-runtime -c cleansstate
5TCLIBC=musl bitbake gcc-runtime
6
7you will see libstdc++ fail to build due to finding libunwind's header file.
8
9Khem: "When we build any of gcc components they expect to use internal version
10and that works with glibc based gcc since the search headers first look into gcc
11headers, however with musl the gcc headers are searched after the standard
12headers ( which is by design the right thing )."
13
14This patch hacks around the issue by looking for a define used during gcc-runtime's
15build and skipping to the internal header in that case.
16
17[YOCTO #10129]
18
19RP 2016/8/18
20
21Upstream-Status: Inappropriate [really need to fix gcc]
22
23Index: git/include/unwind.h
24===================================================================
25--- git.orig/include/unwind.h
26+++ git/include/unwind.h
27@@ -23,6 +23,10 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER L
28 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
30
31+#ifdef _GLIBCXX_SHARED
32+#include_next <unwind.h>
33+#endif
34+
35 #ifndef _UNWIND_H
36 #define _UNWIND_H
37
diff --git a/meta/recipes-support/libunwind/libunwind_git.bb b/meta/recipes-support/libunwind/libunwind_git.bb
index 6d1d9fb76e..cd4cb89378 100644
--- a/meta/recipes-support/libunwind/libunwind_git.bb
+++ b/meta/recipes-support/libunwind/libunwind_git.bb
@@ -13,6 +13,7 @@ SRC_URI = "git://git.sv.gnu.org/libunwind.git \
13 file://0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \ 13 file://0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \
14 " 14 "
15 15
16SRC_URI_append_libc-musl = " file://musl-header-conflict.patch"
16EXTRA_OECONF_append_libc-musl = " --disable-documentation --disable-tests " 17EXTRA_OECONF_append_libc-musl = " --disable-documentation --disable-tests "
17 18
18# http://errors.yoctoproject.org/Errors/Details/20487/ 19# http://errors.yoctoproject.org/Errors/Details/20487/