summaryrefslogtreecommitdiffstats
path: root/lib/libthr/Makefile
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2010-09-15 02:56:32 +0000
committerdavidxu <davidxu@FreeBSD.org>2010-09-15 02:56:32 +0000
commitb00fcaa22c4d87d8f0c95731f5e8325abfbc2075 (patch)
treefedf4c03bd378db206ea154a805f96e271f05b28 /lib/libthr/Makefile
parent6be463abbb69aa61ab186c9cba314068612328ba (diff)
downloadFreeBSD-src-b00fcaa22c4d87d8f0c95731f5e8325abfbc2075.zip
FreeBSD-src-b00fcaa22c4d87d8f0c95731f5e8325abfbc2075.tar.gz
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.
Diffstat (limited to 'lib/libthr/Makefile')
-rw-r--r--lib/libthr/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile
index e64a412..8b7af3a 100644
--- a/lib/libthr/Makefile
+++ b/lib/libthr/Makefile
@@ -25,6 +25,14 @@ CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf
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
+
LDFLAGS+=-Wl,-znodelete
VERSION_DEF=${.CURDIR}/../libc/Versions.def
OpenPOWER on IntegriCloud