OSDN Git Service

* gnat.dg/socket1.adb: Disable on *-*-solaris2*.
[pf3gnuchains/gcc-fork.git] / libffi / configure.ac
index a398839..d4644a3 100644 (file)
@@ -51,7 +51,7 @@ case "$host" in
        TARGET=ARM; TARGETDIR=arm
        ;;
 
-  amd64-*-freebsd*)
+  amd64-*-freebsd* | amd64-*-openbsd*)
        TARGET=X86_64; TARGETDIR=x86
        ;;
 
@@ -111,6 +111,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
        ;;
 
@@ -264,7 +266,7 @@ if test x$TARGET = xX86 || test x$TARGET = xX86_WIN32 || test x$TARGET = xX86_64
        libffi_cv_as_x86_pcrel, [
        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
        ])
@@ -272,6 +274,32 @@ if test x$TARGET = xX86 || test x$TARGET = xX86_WIN32 || test x$TARGET = xX86_64
        AC_DEFINE(HAVE_AS_X86_PCREL, 1,
                  [Define if your assembler supports PC relative relocs.])
     fi
+
+    AC_CACHE_CHECK([assembler .ascii pseudo-op support],
+       libffi_cv_as_ascii_pseudo_op, [
+       libffi_cv_as_ascii_pseudo_op=unknown
+       # Check if we have .ascii
+       AC_TRY_COMPILE([asm (".ascii \"string\"");],,
+                      [libffi_cv_as_ascii_pseudo_op=yes],
+                      [libffi_cv_as_ascii_pseudo_op=no])
+    ])
+    if test "x$libffi_cv_as_ascii_pseudo_op" = xyes; then
+       AC_DEFINE(HAVE_AS_ASCII_PSEUDO_OP, 1,
+              [Define if your assembler supports .ascii.])
+    fi
+
+    AC_CACHE_CHECK([assembler .string pseudo-op support],
+       libffi_cv_as_string_pseudo_op, [
+       libffi_cv_as_string_pseudo_op=unknown
+       # Check if we have .string
+       AC_TRY_COMPILE([asm (".string \"string\"");],,
+                      [libffi_cv_as_string_pseudo_op=yes],
+                      [libffi_cv_as_string_pseudo_op=no])
+    ])
+    if test "x$libffi_cv_as_string_pseudo_op" = xyes; then
+       AC_DEFINE(HAVE_AS_STRING_PSEUDO_OP, 1,
+              [Define if your assembler supports .string.])
+    fi
 fi
 
 case "$target" in
@@ -282,6 +310,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