This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
add support for OpenBSD/mips64*
- From: Jasper Lievisse Adriaanse <jasper at openbsd dot org>
- To: libffi-discuss at sourceware dot org
- Date: Mon, 25 Apr 2011 20:04:18 +0200
- Subject: 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."