summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/i386.c8
-rw-r--r--libgcc/ChangeLog7
-rw-r--r--libgcc/config.host5
-rw-r--r--libgcc/configure20
-rw-r--r--libgcc/configure.ac6
6 files changed, 50 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 07c71cd9532..6c7620e8bf6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2010-09-27 Ian Lance Taylor <iant@google.com>
+
+ * config/i386/i386.c (ix86_supports_split_stack): -fsplit-stack
+ requires assembler support for CFI directives.
+
2010-09-27 Richard Henderson <rth@redhat.com>
* dwarf2out.c (dwarf2out_cfi_label): Use ASM_OUTPUT_DEBUG_LABEL.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 7d4126beece..1d1c3007e0a 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -8415,6 +8415,14 @@ ix86_supports_split_stack (bool report ATTRIBUTE_UNUSED)
if (report)
error ("%<-fsplit-stack%> currently only supported on GNU/Linux");
ret = false;
+#else
+ if (!dwarf2out_do_cfi_asm ())
+ {
+ if (report)
+ error ("%<-fsplit-stack%> requires "
+ "assembler support for CFI directives");
+ ret = false;
+ }
#endif
return ret;
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 1bbebd96fa6..c6ac0b40183 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,5 +1,12 @@
2010-09-27 Ian Lance Taylor <iant@google.com>
+ * configure.ac: Test whether assembler supports CFI directives.
+ * config.host: Only add t-stack and i386/t-stack-i386 to
+ tmake_file if libgcc_cv_cfi is "yes".
+ * configure: Rebuild.
+
+2010-09-27 Ian Lance Taylor <iant@google.com>
+
* generic-morestack.h: New file.
* generic-morestack.c: New file.
* generic-morestack-thread.c: New file.
diff --git a/libgcc/config.host b/libgcc/config.host
index 8476218216c..ab43da96cfb 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -602,7 +602,10 @@ case ${host} in
i[34567]86-*-linux* | x86_64-*-linux* | \
i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | \
i[34567]86-*-gnu*)
- tmake_file="${tmake_file} t-tls t-stack i386/t-stack-i386"
+ tmake_file="${tmake_file} t-tls"
+ if test "$libgcc_cv_cfi" = "yes"; then
+ tmake_file="{$tmake_file} t-stack i386/t-stack-i386"
+ fi
;;
esac
diff --git a/libgcc/configure b/libgcc/configure
index 5c8e3a01ba3..56195bb106d 100644
--- a/libgcc/configure
+++ b/libgcc/configure
@@ -3707,6 +3707,26 @@ $as_echo "$libgcc_cv_fixed_point" >&6; }
fixed_point=$libgcc_cv_fixed_point
+# Check for assembler CFI support.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports CFI directives" >&5
+$as_echo_n "checking whether assembler supports CFI directives... " >&6; }
+if test "${libgcc_cv_cfi+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i = __GCC_HAVE_DWARF2_CFI_ASM;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ libgcc_cv_cfi=yes
+else
+ libgcc_cv_cfi=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_cfi" >&5
+$as_echo "$libgcc_cv_cfi" >&6; }
+
# Check 32bit or 64bit for x86.
case ${host} in
i?86*-*-* | x86_64*-*-*)
diff --git a/libgcc/configure.ac b/libgcc/configure.ac
index 60766371d3a..6bb4844b882 100644
--- a/libgcc/configure.ac
+++ b/libgcc/configure.ac
@@ -135,6 +135,12 @@ AC_CACHE_CHECK([whether fixed-point is supported], [libgcc_cv_fixed_point],
fixed_point=$libgcc_cv_fixed_point
AC_SUBST(fixed_point)
+# Check for assembler CFI support.
+AC_CACHE_CHECK([whether assembler supports CFI directives], [libgcc_cv_cfi],
+ [AC_COMPILE_IFELSE([int i = __GCC_HAVE_DWARF2_CFI_ASM;],
+ [libgcc_cv_cfi=yes],
+ [libgcc_cv_cfi=no])])
+
# Check 32bit or 64bit for x86.
case ${host} in
i?86*-*-* | x86_64*-*-*)