[oe-commits] [openembedded-core] branch krogoth updated: libunwind: Fix build race conflict with gcc and musl

git at git.openembedded.org git at git.openembedded.org
Tue Jun 6 10:39:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch krogoth
in repository openembedded-core.

The following commit(s) were added to refs/heads/krogoth by this push:
     new 793b6e5  libunwind: Fix build race conflict with gcc and musl
793b6e5 is described below

commit 793b6e57d7cf4a093223b4cd34085a929a5c43c3
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Thu Aug 18 14:46:32 2016 +0100

    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]
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 .../libunwind-1.1/musl-header-conflict.patch       | 37 ++++++++++++++++++++++
 meta/recipes-support/libunwind/libunwind_1.1.bb    |  1 +
 2 files changed, 38 insertions(+)

diff --git a/meta/recipes-support/libunwind/libunwind-1.1/musl-header-conflict.patch b/meta/recipes-support/libunwind/libunwind-1.1/musl-header-conflict.patch
new file mode 100644
index 0000000..79f63fd
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind-1.1/musl-header-conflict.patch
@@ -0,0 +1,37 @@
+If you:
+
+TCLIBC=musl bitbake unwind
+TCLIBC=musl bitbake gcc-runtime -c cleansstate
+TCLIBC=musl bitbake gcc-runtime
+
+you will see libstdc++ fail to build due to finding libunwind's header file.
+
+Khem: "When we build any of gcc components they expect to use internal version 
+and that works with glibc based gcc since the search headers first look into gcc 
+headers, however with musl the gcc headers are searched after the standard 
+headers ( which is by design the right thing )."
+
+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.
+
+[YOCTO #10129]
+
+RP 2016/8/18
+
+Upstream-Status: Inappropriate [really need to fix gcc]
+
+Index: git/include/unwind.h
+===================================================================
+--- git.orig/include/unwind.h
++++ git/include/unwind.h
+@@ -23,6 +23,10 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER L
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
+ 
++#ifdef _GLIBCXX_SHARED
++#include_next <unwind.h>
++#endif
++
+ #ifndef _UNWIND_H
+ #define _UNWIND_H
+ 
diff --git a/meta/recipes-support/libunwind/libunwind_1.1.bb b/meta/recipes-support/libunwind/libunwind_1.1.bb
index 1e76c1a..d9da1ad 100644
--- a/meta/recipes-support/libunwind/libunwind_1.1.bb
+++ b/meta/recipes-support/libunwind/libunwind_1.1.bb
@@ -15,6 +15,7 @@ SRC_URI_append_libc-musl = "\
            file://0001-x86-Stub-out-x86_local_resume.patch \
            file://0001-disable-tests.patch \
            file://0001-Fix-build-on-mips-musl.patch \
+           file://musl-header-conflict.patch \
 "
 SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce"
 SRC_URI[sha256sum] = "9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list