libffi rc3 on openbsd sparc/sparc64/mips64

Sebastian Reitenbach sebastia@l00-bugdead-prods.de
Fri Feb 11 14:27:00 GMT 2011


Hi,

attached the regression logs for libffi-rc3 on OpenBSD sparc/sparc64/mips64.

patches to the testsuite for gcc-2.95 I created long time ago, that did not 
maded it into libffi:
http://cygwin.ru/ml/libffi-discuss/2008/msg00161.html
therefore the regression tests for sparc are bit meaningless.

patches from the libffi port to actually compile libffi on OpenBSD mips64
patch-src_mips_ffitarget_h
patch-src_mips_ffi_c

patches to enable libffi compilation on hppa, mips64(el) and powerpc
patch-configure

patches to the testsuite that are in the OpenBSD ports tree:
patch-testsuite_libffi_call_float2_c
patch-testsuite_libffi_call_return_uc_c

there is also a patch for openbsd arm in the ports tree, but it did not 
applied to the new version, and I don't have an arm box around.

libffi is used by my gnustep ports. gnustep-base based ports seem to work fine 
at least on mips64 tested so far, starting any GNUstep GUI application, this 
fails, since they seem to make use of stuff that doesn't pass the regression 
tests. On sparc64 some of the applications start up, but tend to crash early 
when trying to use it.

cheers,
Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libffi-openbsd.tar.gz
Type: application/x-compressed-tar
Size: 138093 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libffi-discuss/attachments/20110211/5098b13f/attachment.bin>
-------------- next part --------------
$OpenBSD: patch-configure,v 1.4 2010/09/19 20:19:15 jasper Exp $

Enable libffi on hppa, mips64(el) and powerpc platforms.

--- configure.orig	Thu Feb 10 00:29:32 2011
+++ configure	Fri Feb 11 14:53:00 2011
@@ -12187,7 +12187,7 @@ case "$host" in
 	TARGET=FRV; TARGETDIR=frv
 	;;
 
-  hppa*-*-linux* | parisc*-*-linux*)
+  hppa*-*-linux* | hppa*-*-openbsd* | parisc*-*-linux*)
 	TARGET=PA_LINUX; TARGETDIR=pa
 	;;
   hppa*64-*-hpux*)
@@ -12237,7 +12237,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
@@ -12255,7 +12255,7 @@ case "$host" in
   powerpc-*-aix* | rs6000-*-aix*)
 	TARGET=POWERPC_AIX; TARGETDIR=powerpc
 	;;
-  powerpc-*-freebsd*)
+  powerpc-*-freebsd* | powerpc-*-openbsd*)
 	TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
 	;;
   powerpc64-*-freebsd*)
-------------- next part --------------
$OpenBSD: patch-src_mips_ffi_c,v 1.1 2010/02/23 19:08:55 jasper Exp $

Allow building this on OpenBSD, where we don't provide the ICACHE related
defines in cachectl.h, but in sysarch.h.

--- src/mips/ffi.c.orig	Tue Feb 26 18:34:36 2008
+++ src/mips/ffi.c	Sat Feb 20 00:46:52 2010
@@ -37,7 +37,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
-------------- next part --------------
$OpenBSD: patch-src_mips_ffitarget_h,v 1.1 2010/09/22 22:24:56 jasper Exp $
--- src/mips/ffitarget.h.orig	Thu Feb 10 00:24:42 2011
+++ src/mips/ffitarget.h	Fri Feb 11 14:53:45 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
 


More information about the Libffi-discuss mailing list