diff options
author | davidxu <davidxu@FreeBSD.org> | 2010-09-25 01:57:47 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2010-09-25 01:57:47 +0000 |
commit | 74604ed9c419ab380cacaaeb78e4c26f9f37e0ad (patch) | |
tree | 7b4cd520f700d5e2d7a21bc8175c8574d209a3ce /lib/libc/Makefile | |
parent | df0d735bfefbd56b7c7cbca4590c651f83e3c831 (diff) | |
download | FreeBSD-src-74604ed9c419ab380cacaaeb78e4c26f9f37e0ad.zip FreeBSD-src-74604ed9c419ab380cacaaeb78e4c26f9f37e0ad.tar.gz |
To support stack unwinding for cancellation points, add -fexceptions flag
for them, two functions _pthread_cancel_enter and _pthread_cancel_leave
are added to let thread enter and leave a cancellation point, it also
makes it possible that other functions can be cancellation points in
libraries without having to be rewritten in libthr.
Diffstat (limited to 'lib/libc/Makefile')
-rw-r--r-- | lib/libc/Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libc/Makefile b/lib/libc/Makefile index dae4db3..3cff71f 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -31,6 +31,11 @@ CLEANFILES+=tags INSTALL_PIC_ARCHIVE= PRECIOUSLIB= +.ifndef NO_THREAD_STACK_UNWIND +CANCELPOINTS_CFLAGS=-fexceptions +CFLAGS+=${CANCELPOINTS_CFLAGS} +.endif + # # Only link with static libgcc.a (no libgcc_eh.a). # @@ -145,3 +150,5 @@ CWARNFLAGS:= ${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/:C/^$/-w/} SSP_CFLAGS:= ${SSP_CFLAGS:S/^-fstack-protector-all$/-fstack-protector/} # Disable stack protection for SSP symbols. SSP_CFLAGS:= ${.IMPSRC:N*/stack_protector.c:C/^.+$/${SSP_CFLAGS}/} +# Generate stack unwinding tables for cancellation points +CANCELPOINTS_CFLAGS:= ${.IMPSRC:Mcancelpoints_*:C/^.+$/${CANCELPOINTS_CFLAGS}/:C/^$//} |