diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 3ffddbf0c55c58053f9c75657658a8463eaffd65..c0092fd6335d539cc9bcc2673d665a969b1936f0 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,20 @@ +2006-07-21 Steve Ellcey <sje@cup.hp.com> + + PR target/26792 + * configure.ac: Use GCC_CHECK_UNWIND_GETIPINFO to + define HAVE_GETIPINFO. + * aclocal.m4: Add include of ../config/unwind_ipinfo.m4. + * config.h.in: Regenerate. + * configure: Regenerate. + * Makefile.in: Regenerate. + * libmath/Makefile.in: Regenerate. + * include/Makefile.in: Regenerate. + * src/Makefile.in: Regenerate. + * libsupc++/Makefile.in: Regenerate. + * testsuite/Makefile.in: Regenerate. + * po/Makefile.in: Regenerate. + * libsupc++/eh_personality.cc: Check HAVE_GETIPINFO. + 2006-07-21 Jason Merrill <jason@redhat.com> * libsupc++/eh_personality.cc: Wrap extern "C" function diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in index 0a391b22a72850f40c5e83b71feff85d13fab8f4..6dc1ec00097856975671e1bcf1c1a2754517dc90 100644 --- a/libstdc++-v3/Makefile.in +++ b/libstdc++-v3/Makefile.in @@ -48,6 +48,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ $(top_srcdir)/../config/no-executables.m4 \ + $(top_srcdir)/../config/unwind_ipinfo.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/crossconfig.m4 \ $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac diff --git a/libstdc++-v3/aclocal.m4 b/libstdc++-v3/aclocal.m4 index 8f4ca5225c68a3ce64fdbd22e795cf46864bb570..4901dd60daa3c70c019586343e395d03c6e478d7 100644 --- a/libstdc++-v3/aclocal.m4 +++ b/libstdc++-v3/aclocal.m4 @@ -641,6 +641,7 @@ AC_SUBST([am__untar]) m4_include([../config/enable.m4]) m4_include([../config/lead-dot.m4]) m4_include([../config/no-executables.m4]) +m4_include([../config/unwind_ipinfo.m4]) m4_include([../libtool.m4]) m4_include([crossconfig.m4]) m4_include([linkage.m4]) diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in index 47e3c989b789cf63ac0abd9f9611220b4d249ab4..7fa144b2b939d7218e9cffcd98c2ab9722d9c277 100644 --- a/libstdc++-v3/config.h.in +++ b/libstdc++-v3/config.h.in @@ -111,6 +111,9 @@ /* Define to 1 if you have the <gconv.h> header file. */ #undef HAVE_GCONV_H +/* Define if _Unwind_GetIPInfo is available. */ +#undef HAVE_GETIPINFO + /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index f5cdf21d006ad7638446c040f1cdf104ab0db060..4486dc5422050805eb67328d7e851ac5aaebeeb2 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -31370,6 +31370,96 @@ _ACEOF fi + # For _Unwind_GetIPInfo. + + + + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -fno-exceptions" + echo "$as_me:$LINENO: checking for _Unwind_GetIPInfo" >&5 +echo $ECHO_N "checking for _Unwind_GetIPInfo... $ECHO_C" >&6 + if test "${gcc_cv_getipinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test x$gcc_no_link = xyes; then + { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 +echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} + { (exit 1); exit 1; }; } +fi +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +extern "C" { extern void _Unwind_GetIPInfo(); } +int +main () +{ +_Unwind_GetIPInfo(); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gcc_cv_getipinfo=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gcc_cv_getipinfo=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi + + if test $gcc_cv_getipinfo = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETIPINFO 1 +_ACEOF + + fi + echo "$as_me:$LINENO: result: $gcc_cv_getipinfo" >&5 +echo "${ECHO_T}$gcc_cv_getipinfo" >&6 + CXXFLAGS="$ac_save_CXXFLAGS" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + if test "${ac_cv_header_locale_h+set}" = set; then echo "$as_me:$LINENO: checking for locale.h" >&5 @@ -108776,6 +108866,12 @@ _ACEOF fi + # Assume we have _Unwind_GetIPInfo for cross-compiles. + cat >>confdefs.h <<\_ACEOF +#define HAVE_GETIPINFO 1 +_ACEOF + + fi # This depends on GLIBCXX CHECK_LINKER_FEATURES, but without it assumes no. diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac index c1b36c9a75b258976c8d9a3d82412789375aa35c..d6ab01f3300d2dacf78f3ebc94a68b168b728182 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac @@ -167,6 +167,9 @@ if $GLIBCXX_IS_NATIVE; then # For TLS support. GCC_CHECK_TLS + # For _Unwind_GetIPInfo. + GCC_CHECK_UNWIND_GETIPINFO + AC_LC_MESSAGES AC_TRY_COMPILE( @@ -283,6 +286,9 @@ else AC_DEFINE(HAVE_TANHL) fi + # Assume we have _Unwind_GetIPInfo for cross-compiles. + AC_DEFINE(HAVE_GETIPINFO) + fi # This depends on GLIBCXX CHECK_LINKER_FEATURES, but without it assumes no. diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index 4fe22d9fd0d69dd866d06eadbf31b2175e1e1bb2..eeae3bb0b33112deb29f327cbbae5408891738db 100644 --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in @@ -43,6 +43,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ $(top_srcdir)/../config/no-executables.m4 \ + $(top_srcdir)/../config/unwind_ipinfo.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/crossconfig.m4 \ $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac diff --git a/libstdc++-v3/libmath/Makefile.in b/libstdc++-v3/libmath/Makefile.in index d5c797d7e418a3c3be2e06bd88e5431e0a3a0f7b..931d39d836d490160442381eb74afb4a79d60108 100644 --- a/libstdc++-v3/libmath/Makefile.in +++ b/libstdc++-v3/libmath/Makefile.in @@ -43,6 +43,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ $(top_srcdir)/../config/no-executables.m4 \ + $(top_srcdir)/../config/unwind_ipinfo.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/crossconfig.m4 \ $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in index 771b432b9c1e1edf0d31d1056843591b42f63a81..167ecd02398aff46a502d7c494d0a805f4b45f97 100644 --- a/libstdc++-v3/libsupc++/Makefile.in +++ b/libstdc++-v3/libsupc++/Makefile.in @@ -45,6 +45,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ $(top_srcdir)/../config/no-executables.m4 \ + $(top_srcdir)/../config/unwind_ipinfo.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/crossconfig.m4 \ $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac diff --git a/libstdc++-v3/libsupc++/eh_personality.cc b/libstdc++-v3/libsupc++/eh_personality.cc index 7576d407da42377ef5c3c2521c47b2314fa50748..5fd25f232d9d39deb204a0b5a50706506d3469bc 100644 --- a/libstdc++-v3/libsupc++/eh_personality.cc +++ b/libstdc++-v3/libsupc++/eh_personality.cc @@ -434,7 +434,11 @@ PERSONALITY_FUNCTION (int version, // Parse the LSDA header. p = parse_lsda_header (context, language_specific_data, &info); info.ttype_base = base_of_encoded_value (info.ttype_encoding, context); +#ifdef HAVE_GETIPINFO ip = _Unwind_GetIPInfo (context, &ip_before_insn); +#else + ip = _Unwind_GetIP (context); +#endif if (! ip_before_insn) --ip; landing_pad = 0; diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in index bdb58636ab9562bd20cc411d6e35d93efd3a51a7..1157e33cbea0ffc5875d8aa4aaf7e7d877575747 100644 --- a/libstdc++-v3/po/Makefile.in +++ b/libstdc++-v3/po/Makefile.in @@ -43,6 +43,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ $(top_srcdir)/../config/no-executables.m4 \ + $(top_srcdir)/../config/unwind_ipinfo.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/crossconfig.m4 \ $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index 187da8eb7a8832dd60e995bc9036f8a98840b162..46e41b5f89c0005ba561ffb1638886e1bca0fb6f 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -43,6 +43,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ $(top_srcdir)/../config/no-executables.m4 \ + $(top_srcdir)/../config/unwind_ipinfo.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/crossconfig.m4 \ $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in index bd5a36deada3cd109bd3e36b0a108d0528734e39..6ec17fd1cb821266a5624fe653f6d6ccc8b54e6e 100644 --- a/libstdc++-v3/testsuite/Makefile.in +++ b/libstdc++-v3/testsuite/Makefile.in @@ -43,6 +43,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ $(top_srcdir)/../config/no-executables.m4 \ + $(top_srcdir)/../config/unwind_ipinfo.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/crossconfig.m4 \ $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac