]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(HAVE_DWARF2_UNWIND_INFO): Check for it.
authorUlrich Drepper <drepper@redhat.com>
Fri, 11 Dec 1998 18:04:12 +0000 (18:04 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 11 Dec 1998 18:04:12 +0000 (18:04 +0000)
(HAVE_DWARF2_UNWIND_INFO_STATIC): Check for it.

configure.in

index 4a0df548594193c8241afa795609cbb16c0b7761..d0065302122c33bc6f5281ae40c18b22e0b8d720 100644 (file)
@@ -759,6 +759,61 @@ fi
 rm -f conftest*])
 AC_SUBST(libc_cv_ld_no_whole_archive)dnl
 
+AC_CACHE_CHECK(for DWARF2 unwind info support, libc_cv_gcc_dwarf2_unwind_info,
+[cat > conftest.c <<EOF
+#line __oline__ "configure"
+static char __EH_FRAME_BEGIN__[];
+_start ()
+{
+#ifdef CHECK__register_frame
+  __register_frame (__EH_FRAME_BEGIN__);
+  __deregister_frame (__EH_FRAME_BEGIN__);
+#endif
+#ifdef CHECK__register_frame_info
+  __register_frame_info (__EH_FRAME_BEGIN__);
+  __deregister_frame_info (__EH_FRAME_BEGIN__);
+#endif
+}
+int __eh_pc;
+__throw () {}
+/* FIXME: this is fragile.  */
+malloc () {}
+strcmp () {}
+strlen () {}
+memcpy () {}
+memset () {}
+free () {}
+abort () {}
+__bzero () {}
+EOF
+dnl No \ in command here because it ends up inside ''.
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS -DCHECK__register_frame_info
+                           -nostdlib -nostartfiles
+                           -o conftest conftest.c -lgcc >&AC_FD_CC]); then
+  libc_cv_gcc_dwarf2_unwind_info=static
+else
+  libc_cv_gcc_dwarf2_unwind_info=no
+fi
+if test $libc_cv_gcc_dwarf2_unwind_info = no; then
+  if AC_TRY_COMMAND([${CC-cc} $CFLAGS -DCHECK__register_frame
+                             -nostdlib -nostartfiles
+                             -o conftest conftest.c -lgcc >&AC_FD_CC]); then
+    libc_cv_gcc_dwarf2_unwind_info=yes
+  else
+    libc_cv_gcc_dwarf2_unwind_info=no
+  fi
+fi
+rm -f conftest*])
+case $libc_cv_gcc_dwarf2_unwind_info in
+yes)
+  AC_DEFINE(HAVE_DWARF2_UNWIND_INFO)
+  ;;
+static)
+  AC_DEFINE(HAVE_DWARF2_UNWIND_INFO)
+  AC_DEFINE(HAVE_DWARF2_UNWIND_INFO_STATIC)
+  ;;
+esac
+
 AC_CACHE_CHECK(for gcc -fno-exceptions, libc_cv_gcc_no_exceptions, [dnl
 cat > conftest.c <<\EOF
 _start () {}