On Wed, Sep 15, 2010 at 11:19:52AM +0000, David Xu wrote: > Alexander Kabaev wrote: > >On Wed, 15 Sep 2010 02:56:33 +0000 (UTC) > >David Xu <[email protected]> wrote: > > > >>Author: davidxu > >>Date: Wed Sep 15 02:56:32 2010 > >>New Revision: 212630 > >>URL: http://svn.freebsd.org/changeset/base/212630 > >> > >>Log: > >> add code to support stack unwinding when thread exits. note that > >>only defer-mode cancellation works, asynchrnous mode does not work > >>because it lacks of libuwind's support. stack unwinding is not > >>enabled unless LIBTHR_UNWIND_STACK is defined in Makefile. > >> > >>Modified: > >> head/lib/libthr/Makefile > >> head/lib/libthr/thread/thr_clean.c > >> head/lib/libthr/thread/thr_create.c > >> head/lib/libthr/thread/thr_exit.c > >> head/lib/libthr/thread/thr_init.c > >> head/lib/libthr/thread/thr_private.h > >> > >>Modified: head/lib/libthr/Makefile > >>============================================================================== > >>--- head/lib/libthr/Makefile Wed Sep 15 01:21:30 2010 > >>(r212629) +++ head/lib/libthr/Makefile Wed Sep 15 02:56:32 > >>2010 (r212630) @@ -25,6 +25,14 @@ > >>CFLAGS+=-I${.CURDIR}/../../libexec/rtld- > >>CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH} > >>CFLAGS+=-I${.CURDIR}/../libthread_db CFLAGS+=-Winline > >>+ > >>+LIBTHR_UNWIND_STACK=yes > >>+ > >>+.ifdef LIBTHR_UNWIND_STACK > >>+CFLAGS+=-I${.CURDIR}/../../contrib/gcc -fexceptions > >>+CFLAGS+=-D_PTHREAD_FORCED_UNWIND > >>+.endif > >>+ > >> > > > >Reaching into bowels of GCC like that is never good. > Any solution ? ;-) > I think the used interfaces are part of the C++ ABI. As such, we can expect them to be present from the runtime support, and provide our own declarations in freebsd-implemented headers.
pgptoiqXx3mxY.pgp
Description: PGP signature
