diff --git a/ChangeLog b/ChangeLog index f965aec8..d1936417 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ * m4/ax_enable_builddir: Change from string comparison to numeric comparison for wc output. + * configure.ac: Enable FFI_MMAP_EXEC_WRIT for darwin11 aka Mac OS + X 10.7. + * configure: Rebuilt. 2011-11-10 Richard Henderson diff --git a/configure b/configure index 4ce690f8..bc4bb15c 100755 --- a/configure +++ b/configure @@ -12240,45 +12240,6 @@ $as_echo "$icc_archflag" >&6; } # default optimization flags for gcc on all systems CFLAGS="-O3 -fomit-frame-pointer" - # -malign-double for x86 systems - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -malign-double" >&5 -$as_echo_n "checking whether C compiler accepts -malign-double... " >&6; } -if ${ax_cv_c_flags__malign_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_save_FLAGS=$CFLAGS - CFLAGS="-malign-double" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_flags__malign_double=yes -else - ax_cv_c_flags__malign_double=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -fi - -eval ax_check_compiler_flags=$ax_cv_c_flags__malign_double -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - CFLAGS="$CFLAGS -malign-double" -else - : -fi - - # -fstrict-aliasing for gcc-2.95+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fstrict-aliasing" >&5 $as_echo_n "checking whether C compiler accepts -fstrict-aliasing... " >&6; } @@ -12318,7 +12279,6 @@ else fi - # note that we enable "unsafe" fp optimization with other compilers, too { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -ffast-math" >&5 $as_echo_n "checking whether C compiler accepts -ffast-math... " >&6; } if ${ax_cv_c_flags__ffast_math+:} false; then : @@ -13105,7 +13065,7 @@ case "$host" in TARGET=FRV; TARGETDIR=frv ;; - hppa*-*-linux* | parisc*-*-linux*) + hppa*-*-linux* | parisc*-*-linux* | hppa*-*-openbsd*) TARGET=PA_LINUX; TARGETDIR=pa ;; hppa*64-*-hpux*) @@ -13155,7 +13115,7 @@ case "$host" in mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*) TARGET=MIPS; TARGETDIR=mips ;; - mips*-*-linux*) + mips*-*-linux* | mips*-*-openbsd*) # Support 128-bit long double for NewABI. HAVE_LONG_DOUBLE='defined(__mips64)' TARGET=MIPS; TARGETDIR=mips @@ -13177,7 +13137,7 @@ case "$host" in powerpc-*-aix* | rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc ;; - powerpc-*-freebsd*) + powerpc-*-freebsd* | powerpc-*-openbsd*) TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc ;; powerpc64-*-freebsd*) @@ -14337,7 +14297,7 @@ case "$target" in $as_echo "#define FFI_EXEC_TRAMPOLINE_TABLE 1" >>confdefs.h ;; - *-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*) + *-apple-darwin1[10]* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*) $as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h diff --git a/configure.ac b/configure.ac index a8adbc2d..8f66d088 100644 --- a/configure.ac +++ b/configure.ac @@ -339,7 +339,7 @@ case "$target" in [Cannot use PROT_EXEC on this target, so, we revert to alternative means]) ;; - *-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*) + *-apple-darwin1[[10]]* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*) AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1, [Cannot use malloc on this target, so, we revert to alternative means]) diff --git a/patches/darwin11 b/patches/darwin11 new file mode 100644 index 00000000..b3c32b75 --- /dev/null +++ b/patches/darwin11 @@ -0,0 +1,121 @@ +Index: libffi/ChangeLog +=================================================================== +--- libffi.orig/ChangeLog ++++ libffi/ChangeLog +@@ -2,6 +2,9 @@ + + * m4/ax_enable_builddir: Change from string comparison to numeric + comparison for wc output. ++ * configure.ac: Enable FFI_MMAP_EXEC_WRIT for darwin11 aka Mac OS ++ X 10.7. ++ * configure: Rebuilt. + + 2011-11-10 Richard Henderson + +Index: libffi/configure +=================================================================== +--- libffi.orig/configure ++++ libffi/configure +@@ -12240,45 +12240,6 @@ $as_echo "$icc_archflag" >&6; } + # default optimization flags for gcc on all systems + CFLAGS="-O3 -fomit-frame-pointer" + +- # -malign-double for x86 systems +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -malign-double" >&5 +-$as_echo_n "checking whether C compiler accepts -malign-double... " >&6; } +-if ${ax_cv_c_flags__malign_double+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- +- ax_save_FLAGS=$CFLAGS +- CFLAGS="-malign-double" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ax_cv_c_flags__malign_double=yes +-else +- ax_cv_c_flags__malign_double=no +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS=$ax_save_FLAGS +-fi +- +-eval ax_check_compiler_flags=$ax_cv_c_flags__malign_double +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 +-$as_echo "$ax_check_compiler_flags" >&6; } +-if test "x$ax_check_compiler_flags" = xyes; then +- CFLAGS="$CFLAGS -malign-double" +-else +- : +-fi +- +- + # -fstrict-aliasing for gcc-2.95+ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fstrict-aliasing" >&5 + $as_echo_n "checking whether C compiler accepts -fstrict-aliasing... " >&6; } +@@ -12318,7 +12279,6 @@ else + fi + + +- # note that we enable "unsafe" fp optimization with other compilers, too + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -ffast-math" >&5 + $as_echo_n "checking whether C compiler accepts -ffast-math... " >&6; } + if ${ax_cv_c_flags__ffast_math+:} false; then : +@@ -13105,7 +13065,7 @@ case "$host" in + TARGET=FRV; TARGETDIR=frv + ;; + +- hppa*-*-linux* | parisc*-*-linux*) ++ hppa*-*-linux* | parisc*-*-linux* | hppa*-*-openbsd*) + TARGET=PA_LINUX; TARGETDIR=pa + ;; + hppa*64-*-hpux*) +@@ -13155,7 +13115,7 @@ case "$host" in + mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*) + TARGET=MIPS; TARGETDIR=mips + ;; +- mips*-*-linux*) ++ mips*-*-linux* | mips*-*-openbsd*) + # Support 128-bit long double for NewABI. + HAVE_LONG_DOUBLE='defined(__mips64)' + TARGET=MIPS; TARGETDIR=mips +@@ -13177,7 +13137,7 @@ case "$host" in + powerpc-*-aix* | rs6000-*-aix*) + TARGET=POWERPC_AIX; TARGETDIR=powerpc + ;; +- powerpc-*-freebsd*) ++ powerpc-*-freebsd* | powerpc-*-openbsd*) + TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc + ;; + powerpc64-*-freebsd*) +@@ -14337,7 +14297,7 @@ case "$target" in + $as_echo "#define FFI_EXEC_TRAMPOLINE_TABLE 1" >>confdefs.h + + ;; +- *-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*) ++ *-apple-darwin1[10]* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*) + + $as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h + +Index: libffi/configure.ac +=================================================================== +--- libffi.orig/configure.ac ++++ libffi/configure.ac +@@ -339,7 +339,7 @@ case "$target" in + [Cannot use PROT_EXEC on this target, so, we revert to + alternative means]) + ;; +- *-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*) ++ *-apple-darwin1[[10]]* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*) + AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1, + [Cannot use malloc on this target, so, we revert to + alternative means]) diff --git a/patches/series b/patches/series index 47b8570b..3ebccee7 100644 --- a/patches/series +++ b/patches/series @@ -27,6 +27,7 @@ fix-ppc32 darwin-EH-fix more-openbsd more-openbsd-mips +darwin11 minix interix-patch