This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

add support for OpenBSD/mips64*


This has been tested and used for more than a year now in OpenBSD ports.
Please commit.

2011-04-25 Jasper Lievisse Adriaanse <jasper@openbsd.org>

	* configure.ac: Add OpenBSD/mips64* support.
	  src/mips/ffi.c: Same.

--- configure.ac.orig	Mon Apr 25 19:49:43 2011
+++ configure.ac	Mon Apr 25 19:50:36 2011
@@ -133,7 +133,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
--- src/mips/ffi.c.orig	Fri Feb 25 22:22:05 2011
+++ src/mips/ffi.c	Mon Apr 25 19:46:59 2011
@@ -38,7 +38,11 @@
 #endif
 
 #ifndef USE__BUILTIN___CLEAR_CACHE
-#include <sys/cachectl.h>
+#  if defined(__OpenBSD__)
+#    include <mips64/sysarch.h>
+#  else
+#    include <sys/cachectl.h>
+#  endif
 #endif
 
 #ifdef FFI_DEBUG

-- 
Cheers,
Jasper

"Capable, generous men do not create victims, they nurture them."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]