diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-04-09 20:55:17 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-04-09 20:55:17 +0000 |
commit | 2724b74a2ef5e1cf796056d08fb3ddd5c0d74831 (patch) | |
tree | 5f77c0aad21a181bc4dd127d5d54c1be36b67b9f /libstdc++-v3/acinclude.m4 | |
parent | 1663b58aff2683fd98f876f45d67e29279fa2caf (diff) | |
download | gcc-2724b74a2ef5e1cf796056d08fb3ddd5c0d74831.tar.gz |
* configure, config.h.in: Rebuild.
* configure.ac: Use GLIBCXX_CHECK_SDT_H. Don't check for
sys/sdt.h.
* acinclude.m4 (GLIBCXX_CHECK_SDT_H): New defun.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197649 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/acinclude.m4')
-rw-r--r-- | libstdc++-v3/acinclude.m4 | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 4d06b207af1..619fff02bf7 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -3660,6 +3660,36 @@ AC_DEFUN([GLIBCXX_ENABLE_WERROR], [ ]) +dnl +dnl Check to see if sys/sdt.h exists and that it is suitable for use. +dnl Some versions of sdt.h were not compatible with C++11. +dnl +AC_DEFUN([GLIBCXX_CHECK_SDT_H], [ + AC_MSG_RESULT([for suitable sys/sdt.h]) + # Note that this test has to be run with the C language. + # Otherwise, sdt.h will try to include some headers from + # libstdc++ itself. + AC_LANG_SAVE + AC_LANG_C + AC_CACHE_VAL(glibcxx_cv_sys_sdt_h, [ + # Because we have to run the test in C, we use grep rather + # than the compiler to check for the bug. The bug is that + # were strings without trailing whitespace, causing g++ + # to look for operator"". The pattern searches for the fixed + # output. + AC_EGREP_CPP([ \",\" ], [ + #include <sys/sdt.h> + int f() { STAP_PROBE(hi, bob); } + ], [glibcxx_cv_sys_sdt_h=yes], [glibcxx_cv_sys_sdt_h=no]) + ]) + AC_LANG_RESTORE + if test $glibcxx_cv_sys_sdt_h = yes; then + AC_DEFINE(HAVE_SYS_SDT_H, 1, + [Define to 1 if you have a suitable <sys/sdt.h> header file]) + fi + AC_MSG_RESULT($glibcxx_cv_sys_sdt_h) +]) + # Macros from the top-level gcc directory. m4_include([../config/gc++filt.m4]) m4_include([../config/tls.m4]) |