]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commit
gcc/4.9: fix C++ exceptions and pthread_exit()
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 15 Aug 2014 16:38:04 +0000 (18:38 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 17 Aug 2014 07:20:40 +0000 (09:20 +0200)
commit6953d5ffebf01ff6b24963058b6d12a3704cbd3f
treebb44da60f992e33153fa6ce10c537f40e4a25733
parent543bc7c92167680e724af4d84404011476fb507a
gcc/4.9: fix C++ exceptions and pthread_exit()

Following the introduction of the support for the musl C library, the
support of C++ exceptions or features like pthread_exit() got broken
even with other libraries such as glibc. This was reported as bug #7028.

The problem was caused by the gcc patch needed to add support for
musl, which modified the libgcc/unwind-dw2-fde-dip.c logic to decide
whether USE_PT_GNU_EH_FRAME should be enabled or not. It completely
removed the existing logic, replacing it by a single logic based on
the definition of TARGET_DL_ITERATE_PHDR. However, this constant gets
defined by the configure script only for Solaris, or Linux Musl
platforms. For glibc/uClibc, the configure script does not define it,
and therefore USE_PT_GNU_EH_FRAME is not defined, causing issues with
exception handling.

This patch fixes that by restoring all the logic of
libgcc/unwind-dw2-fde-dip.c, and just adding the musl logic as one
more case.

It has been successfully runtime tested using the two code examples
provided in bug #7208, with uClibc, musl and glibc.

Cc: Krzysztof Wrzalik <kwrzalik@gmail.com>
Cc: David Bachelart <david.bachelart@bbright.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/gcc/4.9.1/900-musl-support.patch