public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* Extending to support NetBSD mips ports
@ 2009-05-31 18:37 Havard Eidnes
  0 siblings, 0 replies; only message in thread
From: Havard Eidnes @ 2009-05-31 18:37 UTC (permalink / raw)
  To: libffi-discuss

[-- Attachment #1: Type: Text/Plain, Size: 377 bytes --]

Hi,

after applying the attached changes to libffi version 3.0.8,
"make check" reports:

# of expected passes            1389
# of unsupported tests          15

The test was run on an SGI O2 running NetBSD 4.0.

True, the patch in the second attachment is not exactly elegant,
but it's a minimal adptation to what was already there...

Best regards,

- Håvard

[-- Attachment #2: patch-aa --]
[-- Type: Text/Plain, Size: 375 bytes --]

$NetBSD: patch-aa,v 1.8 2009/05/26 12:27:12 he Exp $

Extend which ports we accept to deal with.

--- configure.orig	2008-12-19 17:12:45.000000000 +0100
+++ configure
@@ -21017,7 +21017,7 @@ case "$host" in
   mips-sgi-irix5.* | mips-sgi-irix6.*)
 	TARGET=MIPS; TARGETDIR=mips
 	;;
-  mips*-*-linux*)
+  mips*-*-linux* | mips*-*-netbsd*)
 	TARGET=MIPS; TARGETDIR=mips
 	;;
 

[-- Attachment #3: patch-ae --]
[-- Type: Text/Plain, Size: 459 bytes --]

$NetBSD: patch-ae,v 1.1 2009/05/26 12:27:12 he Exp $

Make a minimal adjustment to support the various NetBSD mips ports.

--- src/mips/ffitarget.h.orig	2008-02-15 19:43:40.000000000 +0100
+++ src/mips/ffitarget.h
@@ -39,6 +39,11 @@
 #    define _ABIO32 _MIPS_SIM_ABI32
 #  endif
 #endif
+#ifdef __NetBSD__
+/* Let's cheat a bit... */   
+#  define _ABIO32 1     
+#  define _MIPS_SIM _ABIO32
+#endif
 
 #if !defined(_MIPS_SIM)
 -- something is very wrong --

[-- Attachment #4: patch-af --]
[-- Type: Text/Plain, Size: 674 bytes --]

$NetBSD: patch-af,v 1.1 2009/05/26 12:27:12 he Exp $

Fixes to support the various NetBSD mips ports.

--- src/mips/ffi.c.orig	2008-02-26 18:34:36.000000000 +0100
+++ src/mips/ffi.c
@@ -32,12 +32,19 @@
 
 #ifdef __GNUC__
 #  if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))
-#    define USE__BUILTIN___CLEAR_CACHE 1
+#    if !defined(__NetBSD__)
+#      define USE__BUILTIN___CLEAR_CACHE 1
+#    endif
 #  endif
 #endif
 
 #ifndef USE__BUILTIN___CLEAR_CACHE
-#include <sys/cachectl.h>
+#  if !defined(__NetBSD__)
+#    include <sys/cachectl.h>
+#  else
+#    include <mips/cachectl.h>
+#    define cacheflush _cacheflush
+#  endif
 #endif
 
 #ifdef FFI_DEBUG

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-05-31 18:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-31 18:37 Extending to support NetBSD mips ports Havard Eidnes

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