X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=libffi%2Fconfigure.ac;h=c810b8590f620aa6cb3d09653e35bd379f20895a;hp=f101f4941770ab74a0fdd0160544d71310153951;hb=7dd2f2ec5c400d576a7d156d44db7472d048838f;hpb=3531d81fc96e1a056686527aafe18cf934ce6d44 diff --git a/libffi/configure.ac b/libffi/configure.ac index f101f494177..c810b8590f6 100644 --- a/libffi/configure.ac +++ b/libffi/configure.ac @@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure AC_PREREQ(2.64) -AC_INIT([libffi], [3.0.8], [http://gcc.gnu.org/bugs.html]) +AC_INIT([libffi], [3.0.9], [http://gcc.gnu.org/bugs.html]) AC_CONFIG_HEADERS([fficonfig.h]) AM_ENABLE_MULTILIB(, ..) @@ -12,7 +12,7 @@ target_alias=${target_alias-$host_alias} . ${srcdir}/configure.host -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE([no-dist]) # The same as in boehm-gc and libstdc++. Have to borrow it from there. # We must force CC to /not/ be precious variables; otherwise @@ -43,7 +43,7 @@ TARGETDIR="unknown" case "$host" in alpha*-*-*) TARGET=ALPHA; TARGETDIR=alpha; - # Support 128-bit long double, changable via command-line switch. + # Support 128-bit long double, changeable via command-line switch. HAVE_LONG_DOUBLE='defined(__LONG_DOUBLE_128__)' ;; @@ -51,7 +51,7 @@ case "$host" in TARGET=ARM; TARGETDIR=arm ;; - amd64-*-freebsd*) + amd64-*-freebsd* | amd64-*-openbsd*) TARGET=X86_64; TARGETDIR=x86 ;; @@ -80,8 +80,17 @@ case "$host" in i?86-*-freebsd* | i?86-*-openbsd*) TARGET=X86_FREEBSD; TARGETDIR=x86 ;; - i?86-win32* | i?86-*-cygwin* | i?86-*-mingw*) + i?86-win32* | i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2*) TARGET=X86_WIN32; TARGETDIR=x86 + # 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 @@ -90,7 +99,7 @@ case "$host" in TARGET=X86_64; TARGETDIR=x86 ;; i?86-*-*) - TARGET=X86; TARGETDIR=x86 + TARGET=X86_64; TARGETDIR=x86 ;; ia64*-*-*) @@ -105,10 +114,12 @@ 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*) + # Support 128-bit long double for NewABI. + HAVE_LONG_DOUBLE='defined(__mips64)' TARGET=MIPS; TARGETDIR=mips ;; @@ -127,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 ;; @@ -152,6 +166,15 @@ case "$host" in x86_64-*-cygwin* | x86_64-*-mingw*) TARGET=X86_WIN64; TARGETDIR=x86 + # 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 ;; x86_64-*-*) @@ -160,6 +183,7 @@ case "$host" in esac AC_SUBST(AM_RUNTESTFLAGS) +AC_SUBST(AM_LTLDFLAGS) if test $TARGETDIR = unknown; then AC_MSG_ERROR(["libffi has not been ported to $host."]) @@ -213,17 +237,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], @@ -261,7 +275,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 ]) @@ -269,6 +283,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 @@ -279,6 +319,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