Commit fe16ab7e by David Mosberger Committed by Jim Wilson

libunwind related patch from David Mosberger

libunwind related patch from David Mosberger
* unwind-libunwind.c (_Unwind_SetGR): Clear the NaT bit as
required by C++ ABI for Itanium.
* config/t-libunwind (LIB2ADDEH): Remove unwind-libunwind.c.
* config/t-libunwind-no-eh: New file.
* configure.in: Check libunwind for _Unwind_Resume() and if it's
present, set libunwind_has_eh_support to "yes".
* configure: Regenerate.
* config.gcc (ia64*-*-linux*): If $libunwind_has_eh_support is
set to yes, use t-libunwind, otherwise, use t-libunwind-no-eh.

From-SVN: r74548
parent 7ac88634
2003-12-11 David Mosberger <davidm@hpl.hp.com>
* unwind-libunwind.c (_Unwind_SetGR): Clear the NaT bit as
required by C++ ABI for Itanium.
* config/t-libunwind (LIB2ADDEH): Remove unwind-libunwind.c.
* config/t-libunwind-no-eh: New file.
* configure.in: Check libunwind for _Unwind_Resume() and if it's
present, set libunwind_has_eh_support to "yes".
* configure: Regenerate.
* config.gcc (ia64*-*-linux*): If $libunwind_has_eh_support is
set to yes, use t-libunwind, otherwise, use t-libunwind-no-eh.
2003-12-11 Richard Sandiford <rsandifo@redhat.com>
* config/mips/mips.c (mips_global_pointer): Force functions with
......
......@@ -1245,7 +1245,11 @@ ia64*-*-linux*)
target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
if test x"$use_libunwind_exceptions" = xyes; then
tmake_file="$tmake_file t-libunwind"
if test x"$libunwind_has_eh_support" = xyes; then
tmake_file="$tmake_file t-libunwind"
else
tmake_file="$tmake_file t-libunwind-no-eh"
fi
fi
;;
ia64*-*-hpux*)
......
......@@ -2,5 +2,4 @@
# so that the resulting libgcc_s.so has the necessary DT_NEEDED entry for
# libunwind.
SHLIB_LC = -lunwind -lc
LIB2ADDEH = $(srcdir)/unwind-libunwind.c $(srcdir)/unwind-sjlj.c \
$(srcdir)/unwind-c.c
LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
# Override the default value from t-slibgcc-elf-ver and mention -lunwind
# so that the resulting libgcc_s.so has the necessary DT_NEEDED entry for
# libunwind.
SHLIB_LC = -lunwind -lc
LIB2ADDEH = $(srcdir)/unwind-libunwind.c $(srcdir)/unwind-sjlj.c \
$(srcdir)/unwind-c.c
......@@ -957,6 +957,8 @@ use_libunwind_exceptions=$use_libunwind_default)
if test x"$use_libunwind_exceptions" = xyes; then
AC_DEFINE(USE_LIBUNWIND_EXCEPTIONS, 1,
[Define if gcc should use -lunwind.])
AC_CHECK_LIB(unwind, _Unwind_Resume, libunwind_has_eh_support=yes,
libunwind_has_eh_support=no)
fi
# --------------------------------------------------------
......
......@@ -124,6 +124,11 @@ _Unwind_SetGR (struct _Unwind_Context *context, int index, _Unwind_Word val)
/* Note: here we depend on the fact that general registers are
expected to start with register number 0! */
unw_set_reg (&context->cursor, index, val);
#ifdef UNW_TARGET_IA64
if (index >= UNW_IA64_GR && index <= UNW_IA64_GR + 127)
/* Clear the NaT bit. */
unw_set_reg (&context->cursor, UNW_IA64_NAT + (index - UNW_IA64_GR), 0);
#endif
}
/* Retrieve the return address for CONTEXT. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment