Thierry Reding <[email protected]> writes:

> From: Thierry Reding <[email protected]>
>
> Building the X server with libunwind support on ARM currently yields
> these errors at link time:
>
>         CCLD     Xorg
>       /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr0'
>       /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr1'
>
> This is caused by the configure script looking for the libunwind.pc file
> which ends up pulling in -lunwind. On ARM that library doesn't link with
> libgcc_s.so where the above symbols are defined, hence the link failure.
>
> If instead the configure script looks for libunwind-generic.pc, then the
> -lunwind-generic library is pulled in (it's a symlink to libunwind-arm),
> which in turn pulls in -lunwind and -lgcc_s (via DT_NEEDED entries).

I'm afraid this conflicts with the libunwind documentation which
explicitly states that -lunwind is the correct library to use for native
unwinding:

FILES
       libunwind.h
               Headerfile to include for native (same platform) unwinding.

       libunwind-PLAT.h
              Header file to include when the unwind target runs on
              platform PLAT.  For example, to unwind an IA-64 program,
              the header file libunwind-ia64.h should be included.

       -lunwind
               Linker-switch to add when building a program that does
              native (same platform) unwinding.

       -lunwind-PLAT
               Linker-switch to add when building a program that unwinds
              a program on platform PLAT.  For example, to
              (cross-)unwind an IA-64 program, the linker switch
              -lunwind-ia64 should be added. Note: multiple such
              switches may need to be specified for programs that can
              unwind programs on mul‐ tiple platforms.

It sounds like libunwind.so is just misbuilt on your platform. I just
checked libunwind.so on Debian's armel distro and it does explicitly
link to libgcc_s. I can't test that it works, of course, but at least
this problem isn't present.

If you want to supply a kludge-around for your broken platform, that'd
be awesome, but I don't think we should apply this patch, which runs
counter to the documentation and isn't needed by most people.

-- 
[email protected]

Attachment: pgp8m9kaHKAh4.pgp
Description: PGP signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to