Patchwork [libffi] Use GCC_AS_CFI_PSEUDO_OP

login
register
mail settings
Submitter Richard Henderson
Date Nov. 10, 2011, 7:41 p.m.
Message ID <4EBC28EA.7090506@redhat.com>
Download mbox | patch
Permalink /patch/124991/
State New
Headers show

Comments

Richard Henderson - Nov. 10, 2011, 7:41 p.m.
Previously, I split out this exact configure fragment to
config/asmcfi.m4 for use in libitm.  This just tidies the
original use in libffi so that we don't have duplicates.

Tested on x86_64-linux and committed.


r~
commit 022a1701c4517308af026c64c707883358b37f26
Author: rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Nov 10 19:34:57 2011 +0000

            * configure.ac (GCC_AS_CFI_PSEUDO_OP): Use it instead of inline check.
            * configure, aclocal.m4: Rebuild.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181266 138bc75d-0d04-0410-961f-82ee72b054a4

Patch

diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index a9d240a..2c34801 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,8 @@ 
+2011-11-10  Richard Henderson  <rth@redhat.com>
+
+	* configure.ac (GCC_AS_CFI_PSEUDO_OP): Use it instead of inline check.
+	* configure, aclocal.m4: Rebuild.
+
 2011-09-04  Iain Sandoe  <iains@gcc.gnu.org>
 
 	PR libffi/49594
diff --git a/libffi/aclocal.m4 b/libffi/aclocal.m4
index f7ef2f8..9d6a669 100644
--- a/libffi/aclocal.m4
+++ b/libffi/aclocal.m4
@@ -1025,6 +1025,7 @@  AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
+m4_include([../config/asmcfi.m4])
 m4_include([../config/depstand.m4])
 m4_include([../config/lead-dot.m4])
 m4_include([../config/multi.m4])
diff --git a/libffi/configure b/libffi/configure
index 6478747..57ccc55 100755
--- a/libffi/configure
+++ b/libffi/configure
@@ -12282,11 +12282,11 @@  $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler .cfi pseudo-op support" >&5
 $as_echo_n "checking assembler .cfi pseudo-op support... " >&6; }
-if test "${libffi_cv_as_cfi_pseudo_op+set}" = set; then :
+if test "${gcc_cv_as_cfi_pseudo_op+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
 
-    libffi_cv_as_cfi_pseudo_op=unknown
+    gcc_cv_as_cfi_pseudo_op=unknown
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 asm (".cfi_startproc\n\t.cfi_endproc");
@@ -12299,20 +12299,21 @@  main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  libffi_cv_as_cfi_pseudo_op=yes
+  gcc_cv_as_cfi_pseudo_op=yes
 else
-  libffi_cv_as_cfi_pseudo_op=no
+  gcc_cv_as_cfi_pseudo_op=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libffi_cv_as_cfi_pseudo_op" >&5
-$as_echo "$libffi_cv_as_cfi_pseudo_op" >&6; }
-if test "x$libffi_cv_as_cfi_pseudo_op" = xyes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_pseudo_op" >&5
+$as_echo "$gcc_cv_as_cfi_pseudo_op" >&6; }
+ if test "x$gcc_cv_as_cfi_pseudo_op" = xyes; then
 
 $as_echo "#define HAVE_AS_CFI_PSEUDO_OP 1" >>confdefs.h
 
-fi
+ fi
+
 
 if test x$TARGET = xSPARC; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler and linker support unaligned pc related relocs" >&5
diff --git a/libffi/configure.ac b/libffi/configure.ac
index d16155a..2c67335 100644
--- a/libffi/configure.ac
+++ b/libffi/configure.ac
@@ -228,17 +228,7 @@  AC_SUBST(HAVE_LONG_DOUBLE)
 
 AC_C_BIGENDIAN
 
-AC_CACHE_CHECK([assembler .cfi pseudo-op support],
-    libffi_cv_as_cfi_pseudo_op, [
-    libffi_cv_as_cfi_pseudo_op=unknown
-    AC_TRY_COMPILE([asm (".cfi_startproc\n\t.cfi_endproc");],,
-		   [libffi_cv_as_cfi_pseudo_op=yes],
-		   [libffi_cv_as_cfi_pseudo_op=no])
-])
-if test "x$libffi_cv_as_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
 
 if test x$TARGET = xSPARC; then
     AC_CACHE_CHECK([assembler and linker support unaligned pc related relocs],