Revert to previous cfi check. (#735)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
diff --git a/configure.ac b/configure.ac
index 2cb26f9..b5ae3d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -124,20 +124,7 @@ AC_SUBST(HAVE_LONG_DOUBLE_VARIANT)
AC_C_BIGENDIAN
-AC_CACHE_CHECK([compiler generates .cfi pseudo-ops],
- gcc_cv_cc_cfi_pseudo_op, [
- gcc_cv_cc_cfi_pseudo_op=no
- echo 'void foo(void) { foo(); }' > conftest.c
- if $CC $CFLAGS -S conftest.c > /dev/null 2>&1; then
- if grep -q cfi_startproc conftest.s; then
- gcc_cv_cc_cfi_pseudo_op=yes
- fi
- fi
- ])
-if test "x$gcc_cv_cc_cfi_pseudo_op" = xyes; then
- AC_DEFINE(HAVE_AS_CFI_PSEUDO_OP, 1,
- [Define if your assembler supports .cfi_* directives.])
-fi
+GCC_AS_CFI_PSEUDO_OP
case "$TARGET" in
SPARC)
diff --git a/m4/asmcfi.m4 b/m4/asmcfi.m4
new file mode 100644
index 0000000..3e28602
--- /dev/null
+++ b/m4/asmcfi.m4
@@ -0,0 +1,13 @@
+AC_DEFUN([GCC_AS_CFI_PSEUDO_OP],
+[AC_CACHE_CHECK([assembler .cfi pseudo-op support],
+ gcc_cv_as_cfi_pseudo_op, [
+ gcc_cv_as_cfi_pseudo_op=unknown
+ AC_TRY_COMPILE([asm (".cfi_sections\n\t.cfi_startproc\n\t.cfi_endproc");],,
+ [gcc_cv_as_cfi_pseudo_op=yes],
+ [gcc_cv_as_cfi_pseudo_op=no])
+ ])
+ if test "x$gcc_cv_as_cfi_pseudo_op" = xyes; then
+ AC_DEFINE(HAVE_AS_CFI_PSEUDO_OP, 1,
+ [Define if your assembler supports .cfi_* directives.])
+ fi
+])