]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
configure.ac: Define FFI_MMAP_EXEC_WRIT for the given targets.
authorAndreas Tobler <a.tobler@schweiz.org>
Sat, 26 Dec 2009 18:49:55 +0000 (18:49 +0000)
committerAndreas Tobler <andreast@gcc.gnu.org>
Sat, 26 Dec 2009 18:49:55 +0000 (19:49 +0100)
2009-12-26  Andreas Tobler  <a.tobler@schweiz.org>

* configure.ac: Define FFI_MMAP_EXEC_WRIT for the given targets.
* configure: Regenerate.
* fficonfig.h.in: Likewise.
* src/closures.c: Remove the FFI_MMAP_EXEC_WRIT definition for
Solaris/x86.

From-SVN: r155475

libffi/ChangeLog
libffi/configure
libffi/configure.ac
libffi/fficonfig.h.in
libffi/src/closures.c

index cf3605016e1ccc222cff31d669adc42b06c24db0..9d06305c58a3d29a865192b7fb864c09512bd4f0 100644 (file)
@@ -1,3 +1,11 @@
+2009-12-26  Andreas Tobler  <a.tobler@schweiz.org>
+
+       * configure.ac: Define FFI_MMAP_EXEC_WRIT for the given targets.
+       * configure: Regenerate.
+       * fficonfig.h.in: Likewise.
+       * src/closures.c: Remove the FFI_MMAP_EXEC_WRIT definition for
+       Solaris/x86.
+
 2009-12-26  Andreas Schwab  <schwab@linux-m68k.org>
 
        * src/powerpc/ffi.c (ffi_prep_args_SYSV): Advance intarg_count
index f8456c9f4b70e0fafac7a635989ffdd0b6648dc6..aa40a0136610eac629260e179afcce65236e5fd8 100755 (executable)
@@ -12405,6 +12405,14 @@ $as_echo "#define HAVE_AS_X86_PCREL 1" >>confdefs.h
     fi
 fi
 
+case "$target" in
+     *-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*)
+
+$as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h
+
+     ;;
+esac
+
 { $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 :
index a1a016cf08271584578a1e69a54277c755502647..f101f4941770ab74a0fdd0160544d71310153951 100644 (file)
@@ -271,6 +271,14 @@ if test x$TARGET = xX86 || test x$TARGET = xX86_WIN32 || test x$TARGET = xX86_64
     fi
 fi
 
+case "$target" in
+     *-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*)
+       AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1,
+                 [Cannot use malloc on this target, so, we revert to
+                   alternative means])
+     ;;
+esac
+
 AC_CACHE_CHECK([whether .eh_frame section should be read-only],
     libffi_cv_ro_eh_frame, [
        libffi_cv_ro_eh_frame=no
index 9fce46b2ea9437829bcd00c86b82d6eb13c8c5c5..e03bbf90b275cdfa98d40d72bf317a9c5a8a166e 100644 (file)
@@ -17,6 +17,9 @@
 /* Define this if you want extra debugging. */
 #undef FFI_DEBUG
 
+/* Cannot use malloc on this target, so, we revert to alternative means */
+#undef FFI_MMAP_EXEC_WRIT
+
 /* Define this is you do not want support for the raw API. */
 #undef FFI_NO_RAW_API
 
index 48cb41567a99564c2c7121aff7031629d3ed0a15..0b156e0f00d592ecf731bdc80181c16c1f36f4ef 100644 (file)
    executable memory. */
 #  define FFI_MMAP_EXEC_WRIT 1
 # endif
-# if defined(X86_64) && defined(__sun__) && defined(__svr4__)
-/* The data segment on 64-bit Solaris/x86 isn't executable, so use mmap
-   instead.  */
-#  define FFI_MMAP_EXEC_WRIT 1
-# endif
 #endif
 
 #if FFI_MMAP_EXEC_WRIT && !defined FFI_MMAP_EXEC_SELINUX