OSDN Git Service

* configure.ac (gcc_cv_ld_eh_gc_sections): Redirect objdump errors
[pf3gnuchains/gcc-fork.git] / libffi / configure
index b849fe3..a63368b 100755 (executable)
@@ -11328,7 +11328,7 @@ case "$host" in
        TARGET=ARM; TARGETDIR=arm
        ;;
 
-  amd64-*-freebsd*)
+  amd64-*-freebsd* | amd64-*-openbsd*)
        TARGET=X86_64; TARGETDIR=x86
        ;;
 
@@ -11388,6 +11388,8 @@ case "$host" in
        TARGET=MIPS; TARGETDIR=mips
        ;;
   mips*-*-linux*)
+       # Support 128-bit long double for NewABI.
+       HAVE_LONG_DOUBLE='defined(__mips64)'
        TARGET=MIPS; TARGETDIR=mips
        ;;
 
@@ -12395,7 +12397,7 @@ else
 
        libffi_cv_as_x86_pcrel=yes
        echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s
-       if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
+       if $CC $CFLAGS -c conftest.s 2>&1 | $EGREP -i 'illegal|warning' > /dev/null; then
            libffi_cv_as_x86_pcrel=no
        fi
 
@@ -12407,6 +12409,76 @@ $as_echo "$libffi_cv_as_x86_pcrel" >&6; }
 $as_echo "#define HAVE_AS_X86_PCREL 1" >>confdefs.h
 
     fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler .ascii pseudo-op support" >&5
+$as_echo_n "checking assembler .ascii pseudo-op support... " >&6; }
+if test "${libffi_cv_as_ascii_pseudo_op+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       libffi_cv_as_ascii_pseudo_op=unknown
+       # Check if we have .ascii
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+asm (".ascii \"string\"");
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  libffi_cv_as_ascii_pseudo_op=yes
+else
+  libffi_cv_as_ascii_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_ascii_pseudo_op" >&5
+$as_echo "$libffi_cv_as_ascii_pseudo_op" >&6; }
+    if test "x$libffi_cv_as_ascii_pseudo_op" = xyes; then
+
+$as_echo "#define HAVE_AS_ASCII_PSEUDO_OP 1" >>confdefs.h
+
+    fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler .string pseudo-op support" >&5
+$as_echo_n "checking assembler .string pseudo-op support... " >&6; }
+if test "${libffi_cv_as_string_pseudo_op+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       libffi_cv_as_string_pseudo_op=unknown
+       # Check if we have .string
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+asm (".string \"string\"");
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  libffi_cv_as_string_pseudo_op=yes
+else
+  libffi_cv_as_string_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_string_pseudo_op" >&5
+$as_echo "$libffi_cv_as_string_pseudo_op" >&6; }
+    if test "x$libffi_cv_as_string_pseudo_op" = xyes; then
+
+$as_echo "#define HAVE_AS_STRING_PSEUDO_OP 1" >>confdefs.h
+
+    fi
 fi
 
 case "$target" in
@@ -12417,6 +12489,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 :