re PR target/55061 (libbacktrace build fails during bootstrap on powerpc-apple-darwin9)

PR target/55061
	* configure.ac: Check whether -funwind-tables option works.
	* configure: Rebuild.

From-SVN: r192782
This commit is contained in:
Ian Lance Taylor 2012-10-24 21:09:55 +00:00 committed by Ian Lance Taylor
parent 45c29893a6
commit 32061319f7
3 changed files with 53 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2012-10-24 Ian Lance Taylor <iant@google.com>
PR target/55061
* configure.ac: Check whether -funwind-tables option works.
* configure: Rebuild.
2012-10-11 Ian Lance Taylor <iant@google.com>
* configure.ac: Do not use dl_iterate_phdr on Solaris 10.

View File

@ -11490,8 +11490,40 @@ fi
EXTRA_FLAGS=
if test "x$GCC" = "xyes"; then
if test -n "${with_target_subdir}"; then
EXTRA_FLAGS=-funwind-tables
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -funwind-tables option" >&5
$as_echo_n "checking for -funwind-tables option... " >&6; }
if test "${libbacktrace_cv_c_unwind_tables+set}" = set; then :
$as_echo_n "(cached) " >&6
else
CFLAGS_hold="$CFLAGS"
CFLAGS="$CFLAGS -funwind-tables"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
static int f() { return 0; }
int
main ()
{
return f();
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
libbacktrace_cv_c_unwind_tables=yes
else
libbacktrace_cv_c_unwind_tables=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$CFLAGS_hold"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libbacktrace_cv_c_unwind_tables" >&5
$as_echo "$libbacktrace_cv_c_unwind_tables" >&6; }
if test "$libbacktrace_cv_c_unwind_tables" = "yes"; then
EXTRA_FLAGS=-funwind-tables
fi
fi

View File

@ -97,8 +97,21 @@ fi
AC_SUBST(BACKTRACE_FILE)
EXTRA_FLAGS=
if test "x$GCC" = "xyes"; then
if test -n "${with_target_subdir}"; then
EXTRA_FLAGS=-funwind-tables
else
AC_CACHE_CHECK([for -funwind-tables option],
[libbacktrace_cv_c_unwind_tables],
[CFLAGS_hold="$CFLAGS"
CFLAGS="$CFLAGS -funwind-tables"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([static int f() { return 0; }], [return f();])],
[libbacktrace_cv_c_unwind_tables=yes],
[libbacktrace_cv_c_unwind_tables=no])
CFLAGS="$CFLAGS_hold"])
if test "$libbacktrace_cv_c_unwind_tables" = "yes"; then
EXTRA_FLAGS=-funwind-tables
fi
fi
AC_SUBST(EXTRA_FLAGS)