OSDN Git Service

Build 64-bit libffi multilib for i?86-linux
[pf3gnuchains/gcc-fork.git] / libffi / configure.ac
index 64e80e2..0788b31 100644 (file)
@@ -82,8 +82,15 @@ case "$host" in
        ;;
   i?86-win32* | i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2*)
        TARGET=X86_WIN32; TARGETDIR=x86
-       # All mingw/cygwin/win32 builds require this for sharedlib
-       AM_LTLDFLAGS="-no-undefined"
+       # All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
+       # We must also check with_cross_host to decide if this is a native
+       # or cross-build and select where to install dlls appropriately.
+       if test -n "$with_cross_host" &&
+          test x"$with_cross_host" != x"no"; then
+         AM_LTLDFLAGS='-no-undefined -bindir "$(toolexeclibdir)"';
+       else
+         AM_LTLDFLAGS='-no-undefined -bindir "$(bindir)"';
+       fi
        ;;
   i?86-*-darwin*)
        TARGET=X86_DARWIN; TARGETDIR=x86
@@ -92,7 +99,7 @@ case "$host" in
        TARGET=X86_64; TARGETDIR=x86
        ;;
   i?86-*-*)
-       TARGET=X86; TARGETDIR=x86
+       TARGET=X86_64; TARGETDIR=x86
        ;;
 
   ia64*-*-*)
@@ -107,7 +114,7 @@ case "$host" in
        TARGET=M68K; TARGETDIR=m68k
        ;;
 
-  mips-sgi-irix5.* | mips-sgi-irix6.*)
+  mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
        TARGET=MIPS; TARGETDIR=mips
        ;;
   mips*-*-linux*)
@@ -131,6 +138,9 @@ case "$host" in
   powerpc-*-freebsd*)
        TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
        ;;
+ powerpc64-*-freebsd*)
+       TARGET=POWERPC; TARGETDIR=powerpc
+       ;;
   powerpc*-*-rtems*)
        TARGET=POWERPC; TARGETDIR=powerpc
        ;;
@@ -218,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],
@@ -279,7 +279,7 @@ if test x$TARGET = xX86 || test x$TARGET = xX86_WIN32 || test x$TARGET = xX86_64
        libffi_cv_as_ascii_pseudo_op, [
        libffi_cv_as_ascii_pseudo_op=unknown
        # Check if we have .ascii
-       AC_TRY_COMPILE([asm (".ascii \"string\"");],,
+       AC_TRY_COMPILE([asm (".ascii \\"string\\"");],,
                       [libffi_cv_as_ascii_pseudo_op=yes],
                       [libffi_cv_as_ascii_pseudo_op=no])
     ])
@@ -292,7 +292,7 @@ if test x$TARGET = xX86 || test x$TARGET = xX86_WIN32 || test x$TARGET = xX86_64
        libffi_cv_as_string_pseudo_op, [
        libffi_cv_as_string_pseudo_op=unknown
        # Check if we have .string
-       AC_TRY_COMPILE([asm (".string \"string\"");],,
+       AC_TRY_COMPILE([asm (".string \\"string\\"");],,
                       [libffi_cv_as_string_pseudo_op=yes],
                       [libffi_cv_as_string_pseudo_op=no])
     ])