1 2011-01-14 Tom Tromey <tromey@redhat.com>
3 * unwind-dw2.c: Include sys/sdt.h if it exists.
4 (_Unwind_DebugHook): Use STAP_PROBE2.
5 * config.in, configure: Rebuild.
6 * configure.ac: Check for sys/sdt.h.
10 @@ -4313,6 +4313,16 @@ if test x$gcc_cv_libc_provides_ssp = xyes; then
11 [Define if your target C library provides stack protector support])
14 +# Test for <sys/sdt.h> on the target.
15 +GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
16 +AC_MSG_CHECKING(sys/sdt.h in the target C library)
18 +if test -f $target_header_dir/sys/sdt.h; then
19 + AC_DEFINE(HAVE_SYS_SDT_H, 1,
20 + [Define if your target C library provides sys/sdt.h])
22 +AC_MSG_RESULT($have_sys_sdt_h)
24 # Check if TFmode long double should be used by default or not.
25 # Some glibc targets used DFmode long double, but with glibc 2.4
26 # and later they can use TFmode.
31 #include "unwind-dw2.h"
33 +#ifdef HAVE_SYS_SDT_H
37 #ifndef __USING_SJLJ_EXCEPTIONS__
39 #ifndef STACK_GROWS_DOWNWARD
40 @@ -1493,7 +1497,13 @@ static void
41 _Unwind_DebugHook (void *cfa __attribute__ ((__unused__)),
42 void *handler __attribute__ ((__unused__)))
44 + /* We only want to use stap probes starting with v3. Earlier
45 + versions added too much startup cost. */
46 +#if defined (HAVE_SYS_SDT_H) && defined (STAP_PROBE2) && _SDT_NOTE_TYPE >= 3
47 + STAP_PROBE2 (libgcc, unwind, cfa, handler);
53 /* Install TARGET into CURRENT so that we can return to it. This is a
55 --- gcc/config.in.jj 2011-01-22 10:21:47.000000000 +0100
56 +++ gcc/config.in 2011-01-22 11:10:39.000000000 +0100
61 +/* Define if your target C library provides sys/sdt.h */
62 +#undef HAVE_SYS_SDT_H
64 /* Define to 1 if you have the <sys/stat.h> header file. */
65 #ifndef USED_FOR_TARGET
66 #undef HAVE_SYS_STAT_H
67 --- gcc/configure.jj 2011-01-22 10:20:55.000000000 +0100
68 +++ gcc/configure 2011-01-22 11:10:34.990648298 +0100
69 @@ -25757,6 +25757,19 @@ $as_echo "#define TARGET_LIBC_PROVIDES_S
73 +# Test for <sys/sdt.h> on the target.
75 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
76 +$as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
78 +if test -f $target_header_dir/sys/sdt.h; then
80 +$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
83 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
84 +$as_echo "$have_sys_sdt_h" >&6; }
86 # Check if TFmode long double should be used by default or not.
87 # Some glibc targets used DFmode long double, but with glibc 2.4
88 # and later they can use TFmode.