about summary refs log tree commit diff
path: root/nptl/sysdeps/pthread/configure.in
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-06-29 23:01:49 +0000
committerUlrich Drepper <drepper@redhat.com>2003-06-29 23:01:49 +0000
commite479cc8e4c2297c6d1f190192bd8038b1b7e99d2 (patch)
tree81d6c0a114ebbaa390559c3247bd9c1dce8a0015 /nptl/sysdeps/pthread/configure.in
parent5245d8a1fe962ee93d81e305e8fa249ee8a6b354 (diff)
downloadglibc-e479cc8e4c2297c6d1f190192bd8038b1b7e99d2.tar.gz
glibc-e479cc8e4c2297c6d1f190192bd8038b1b7e99d2.tar.xz
glibc-e479cc8e4c2297c6d1f190192bd8038b1b7e99d2.zip
Update.
2003-06-29  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
Diffstat (limited to 'nptl/sysdeps/pthread/configure.in')
-rw-r--r--nptl/sysdeps/pthread/configure.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/nptl/sysdeps/pthread/configure.in b/nptl/sysdeps/pthread/configure.in
index e4ea6830d6..922741e723 100644
--- a/nptl/sysdeps/pthread/configure.in
+++ b/nptl/sysdeps/pthread/configure.in
@@ -16,4 +16,19 @@ _Unwind_GetCFA (context)],
 libc_cv_forced_unwind=yes, libc_cv_forced_unwind=no)])
 if test $libc_cv_forced_unwind = yes; then
   AC_DEFINE(HAVE_FORCED_UNWIND)
+dnl Check for C cleanup handling.
+  old_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -Werror -fexceptions"
+  AC_CACHE_CHECK([for C cleanup handling], libc_cv_c_cleanup, [dnl
+  AC_TRY_LINK([
+#include <stdio.h>
+void cl (void *a) { }
+extern c (void);], [
+  int a __attribute__ ((cleanup (cl)));
+  puts ("test")],
+libc_cv_c_cleanup=yes, libc_cv_c_cleanup=no)])
+  CFLAGS="$old_CFLAGS"
+  if test $libc_cv_c_cleanup = no; then
+    AC_MSG_ERROR([the compiler must support C cleanup handling])
+  fi
 fi