aboutsummaryrefslogtreecommitdiff
path: root/libbacktrace/configure
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2012-10-24 21:09:55 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-10-24 21:09:55 +0000
commit32061319f77b80e9a52855fa990856f6bfce682b (patch)
treec53daad197d3a091ed98e30d079c0242bd7c1e81 /libbacktrace/configure
parent45c29893a678fe93a54ce82718a7d3839d69b8c4 (diff)
downloadgcc-32061319f77b80e9a52855fa990856f6bfce682b.zip
gcc-32061319f77b80e9a52855fa990856f6bfce682b.tar.gz
gcc-32061319f77b80e9a52855fa990856f6bfce682b.tar.bz2
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
Diffstat (limited to 'libbacktrace/configure')
-rwxr-xr-xlibbacktrace/configure34
1 files changed, 33 insertions, 1 deletions
diff --git a/libbacktrace/configure b/libbacktrace/configure
index 9a88e8e4..e279737 100755
--- a/libbacktrace/configure
+++ b/libbacktrace/configure
@@ -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