summaryrefslogtreecommitdiff
path: root/patches/more-openbsd-mips
blob: 2c5c3e9630bd98c908a3c4d9ee47fd80b8874ecc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Index: libffi/configure.ac
===================================================================
--- libffi.orig/configure.ac
+++ libffi/configure.ac
@@ -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
Index: libffi/src/mips/ffi.c
===================================================================
--- libffi.orig/src/mips/ffi.c
+++ libffi/src/mips/ffi.c
@@ -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
Index: libffi/src/mips/ffitarget.h
===================================================================
--- libffi.orig/src/mips/ffitarget.h
+++ libffi/src/mips/ffitarget.h
@@ -36,7 +36,7 @@
 #define _MIPS_SIM_ABI32		1
 #define _MIPS_SIM_NABI32	2
 #define _MIPS_SIM_ABI64		3
-#else
+#elif !defined(__OpenBSD__)
 # include <sgidefs.h>
 #endif