re PR libffi/40700 (All amd64 libffi execution tests fail on Solaris 10/x86)
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 10 Dec 2009 10:09:17 +0000 (10:09 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Thu, 10 Dec 2009 10:09:17 +0000 (10:09 +0000)
PR libffi/40700
* src/closures.c [X86_64 && __sun__ && __svr4__]
(FFI_MMAP_EXEC_WRIT): Define.

From-SVN: r155124

libffi/ChangeLog
libffi/src/closures.c

index 950b7fd43fe1cc384bb6ff2787bca75cdfb12480..029735f49bda8bba56757be32589b3ecddbaa49f 100644 (file)
@@ -1,3 +1,9 @@
+2009-12-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR libffi/40700
+       * src/closures.c [X86_64 && __sun__ && __svr4__]
+       (FFI_MMAP_EXEC_WRIT): Define.
+
 2009-12-08  David Daney  <ddaney@caviumnetworks.com>
 
        * testsuite/libffi.call/stret_medium.c: Remove xfail for mips*-*-*
index f07ad06bf33b0769c77910e1a4c924bc429852f6..48cb41567a99564c2c7121aff7031629d3ed0a15 100644 (file)
@@ -1,6 +1,6 @@
 /* -----------------------------------------------------------------------
    closures.c - Copyright (c) 2007  Red Hat, Inc.
-   Copyright (C) 2007 Free Software Foundation, Inc
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc
 
    Code to allocate and deallocate memory for closures.
 
    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