public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* add support for OpenBSD/mips64*
@ 2011-04-25 18:04 Jasper Lievisse Adriaanse
  2011-04-26 13:05 ` Jasper Lievisse Adriaanse
  0 siblings, 1 reply; 2+ messages in thread
From: Jasper Lievisse Adriaanse @ 2011-04-25 18:04 UTC (permalink / raw)
  To: libffi-discuss

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."

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: add support for OpenBSD/mips64*
  2011-04-25 18:04 add support for OpenBSD/mips64* Jasper Lievisse Adriaanse
@ 2011-04-26 13:05 ` Jasper Lievisse Adriaanse
  0 siblings, 0 replies; 2+ messages in thread
From: Jasper Lievisse Adriaanse @ 2011-04-26 13:05 UTC (permalink / raw)
  To: libffi-discuss

On Mon, Apr 25, 2011 at 08:04:18PM +0200, Jasper Lievisse Adriaanse wrote:
> 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."

Please use this diff instead, there are still quite some failing tests but at
least it's building now.

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

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

--- configure.orig	Fri Feb 25 22:22:16 2011
+++ configure	Mon Apr 25 19:46:59 2011
@@ -13115,7 +13115,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 20:02:33 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
--- src/mips/ffitarget.h.orig	Tue Apr 26 14:54:19 2011
+++ src/mips/ffitarget.h	Tue Apr 26 14:55:00 2011
@@ -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
 


-- 
Cheers,
Jasper

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-26 13:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-25 18:04 add support for OpenBSD/mips64* Jasper Lievisse Adriaanse
2011-04-26 13:05 ` Jasper Lievisse Adriaanse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).