[OE-core] [dizzy][PATCH] libunwind: backport patch to link against libgcc_s intead of libgcc

Khem Raj raj.khem at gmail.com
Wed Mar 11 03:19:48 UTC 2015


> On Mar 10, 2015, at 8:05 PM, Jonathan Liu <net147 at gmail.com> wrote:
> 
> On 11 March 2015 at 13:43, Khem Raj <raj.khem at gmail.com> wrote:
>> 
>>> On Mar 10, 2015, at 7:33 PM, Jonathan Liu <net147 at gmail.com> wrote:
>>> 
>>> Signed-off-by: Jonathan Liu <net147 at gmail.com>
>>> ---
>>> ...-libunwind-to-libgcc_s-rather-than-libgcc.patch | 42 ++++++++++++++++++++++
>>> meta/recipes-support/libunwind/libunwind_1.1.bb    |  1 +
>>> 2 files changed, 43 insertions(+)
>>> create mode 100644 meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
>>> 
>>> diff --git a/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch b/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
>>> new file mode 100644
>>> index 0000000..0e55c91
>>> --- /dev/null
>>> +++ b/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
>>> @@ -0,0 +1,42 @@
>>> +From 508ca17a7be01d1cc960d9a07d0af4513948fb8d Mon Sep 17 00:00:00 2001
>>> +From: Thierry Reding <treding at nvidia.com>
>>> +Date: Fri, 27 Jun 2014 08:40:33 +0200
>>> +Subject: [PATCH] Link libunwind to libgcc_s rather than libgcc
>>> +
>>> +For some architectures, -lgcc and -lgcc_s are not equivalent. On ARM for
>>> +example, libgcc_s.so.1 contains some symbols needed by libunwind which
>>> +are not present in libgcc.
>>> +
>>> +This causes the following link error when building the X.Org X server
>>> +with libunwind support:
>>> +
>>> +       CCLD     Xorg
>>> +     /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr0'
>>> +     /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr1'
>>> +
>>> +Linking against libgcc_s explicitly solves this problem.
>>> +
>> 
>> have you tried it at runtime too ?
>> 
> strace 4.9 with libunwind PACKAGECONFIG wouldn't build on master
> without the patch.
> If I add strace 4.9 recipe to dizzy branch, using the libunwind
> PACKAGECONFIG also fails to build without the patch. It gives the same
> errors during linking.
> 
> I tested at runtime on master branch which has libunwind 1.1 running
> strace 4.9 on the target and didn't notice any issues. I haven't
> tested on dizzy branch at runtime though.

OK thanks, it would be interesting to see if exception handling in some binaries and shared objects is able to unwind through
to make sure this all works 




More information about the Openembedded-core mailing list