]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
configure.ac (libffi_cv_as_x86_64_unwind_section_type): New test.
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Mon, 15 Mar 2010 19:36:26 +0000 (19:36 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Mon, 15 Mar 2010 19:36:26 +0000 (19:36 +0000)
* configure.ac (libffi_cv_as_x86_64_unwind_section_type): New test.
* configure: Regenerate.
* fficonfig.h.in: Regenerate.
* libffi/src/x86/unix64.S (.eh_frame)
[HAVE_AS_X86_64_UNWIND_SECTION_TYPE]: Use @unwind section type.

From-SVN: r157466

libffi/ChangeLog
libffi/configure
libffi/configure.ac
libffi/fficonfig.h.in
libffi/src/x86/unix64.S

index 85e255d1d2779e9cab00707d71e6d0c66a5f85de..200f5252d03a0b5b2c5d88a28a68a588a888b1f8 100644 (file)
@@ -1,3 +1,11 @@
+2010-03-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * configure.ac (libffi_cv_as_x86_64_unwind_section_type): New test.
+       * configure: Regenerate.
+       * fficonfig.h.in: Regenerate.
+       * libffi/src/x86/unix64.S (.eh_frame)
+       [HAVE_AS_X86_64_UNWIND_SECTION_TYPE]: Use @unwind section type.
+
 2010-02-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * doc/libffi.texi (The Closure API): Fix typo.
index 43fc0ec6e428f8a55b45f614c5061edc52737bc9..5555e51289dd865aa723810fbd44d773fb52f032 100755 (executable)
@@ -12419,6 +12419,29 @@ $as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h
      ;;
 esac
 
+if test x$TARGET = xX86_64; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler supports unwind section type" >&5
+$as_echo_n "checking assembler supports unwind section type... " >&6; }
+if test "${libffi_cv_as_x86_64_unwind_section_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       libffi_cv_as_x86_64_unwind_section_type=yes
+       echo '.section .eh_frame,"a",@unwind' > conftest.s
+       if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
+           libffi_cv_as_x86_64_unwind_section_type=no
+       fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libffi_cv_as_x86_64_unwind_section_type" >&5
+$as_echo "$libffi_cv_as_x86_64_unwind_section_type" >&6; }
+    if test "x$libffi_cv_as_x86_64_unwind_section_type" = xyes; then
+
+$as_echo "#define HAVE_AS_X86_64_UNWIND_SECTION_TYPE 1" >>confdefs.h
+
+    fi
+fi
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether .eh_frame section should be read-only" >&5
 $as_echo_n "checking whether .eh_frame section should be read-only... " >&6; }
 if test "${libffi_cv_ro_eh_frame+set}" = set; then :
index c0e0da1650756a823a68a75c69213b6e37ae1e63..1b484f94bde071c9a08965dfac7b45ef9900be04 100644 (file)
@@ -284,6 +284,21 @@ case "$target" in
      ;;
 esac
 
+if test x$TARGET = xX86_64; then
+    AC_CACHE_CHECK([assembler supports unwind section type],
+       libffi_cv_as_x86_64_unwind_section_type, [
+       libffi_cv_as_x86_64_unwind_section_type=yes
+       echo '.section .eh_frame,"a",@unwind' > conftest.s
+       if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
+           libffi_cv_as_x86_64_unwind_section_type=no
+       fi
+       ])
+    if test "x$libffi_cv_as_x86_64_unwind_section_type" = xyes; then
+       AC_DEFINE(HAVE_AS_X86_64_UNWIND_SECTION_TYPE, 1,
+                 [Define if your assembler supports unwind section type.])
+    fi
+fi
+
 AC_CACHE_CHECK([whether .eh_frame section should be read-only],
     libffi_cv_ro_eh_frame, [
        libffi_cv_ro_eh_frame=no
index e03bbf90b275cdfa98d40d72bf317a9c5a8a166e..7231cc5ead3c59eba3ac56f385ea0de5d9df0f86 100644 (file)
@@ -43,6 +43,9 @@
    */
 #undef HAVE_AS_SPARC_UA_PCREL
 
+/* Define if your assembler supports unwind section type. */
+#undef HAVE_AS_X86_64_UNWIND_SECTION_TYPE
+
 /* Define if your assembler supports PC relative relocs. */
 #undef HAVE_AS_X86_PCREL
 
index fe3f4fd6223cb8c87d4f1df75c0af4af0e49d443..7a6619a54864482635051ffae3ac13449ab1b49a 100644 (file)
@@ -324,7 +324,11 @@ ffi_closure_unix64:
 .LUW9:
        .size   ffi_closure_unix64,.-ffi_closure_unix64
 
+#ifdef HAVE_AS_X86_64_UNWIND_SECTION_TYPE
+       .section        .eh_frame,"a",@unwind
+#else
        .section        .eh_frame,"a",@progbits
+#endif
 .Lframe1:
        .long   .LECIE1-.LSCIE1         /* CIE Length */
 .LSCIE1: