aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-12-11 18:04:12 +0000
committerUlrich Drepper <drepper@redhat.com>1998-12-11 18:04:12 +0000
commit74600f090eda05a215141f77284eff0667a2a086 (patch)
treee0e5b6545fee05708e22f04f9c1cd0e7de27df43
parent03b0ae9d90db5d414ab948949a92e5c1ef2bdad6 (diff)
downloadglibc-74600f090eda05a215141f77284eff0667a2a086.tar
glibc-74600f090eda05a215141f77284eff0667a2a086.tar.gz
glibc-74600f090eda05a215141f77284eff0667a2a086.tar.bz2
glibc-74600f090eda05a215141f77284eff0667a2a086.zip
(HAVE_DWARF2_UNWIND_INFO): Check for it.
(HAVE_DWARF2_UNWIND_INFO_STATIC): Check for it.
-rw-r--r--configure.in55
1 files changed, 55 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 4a0df54859..d006530212 100644
--- a/configure.in
+++ b/configure.in
@@ -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 () {}