public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* libffi rc3 on openbsd sparc/sparc64/mips64
@ 2011-02-11 14:27 Sebastian Reitenbach
  2011-02-11 14:35 ` Richard Frith-Macdonald
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Reitenbach @ 2011-02-11 14:27 UTC (permalink / raw)
  To: libffi-discuss

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

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

[-- Attachment #2: libffi-openbsd.tar.gz --]
[-- Type: application/x-compressed-tar, Size: 138093 bytes --]

[-- Attachment #3: patch-configure --]
[-- Type: text/plain, Size: 997 bytes --]

$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*)

[-- Attachment #4: patch-src_mips_ffi_c --]
[-- Type: text/plain, Size: 511 bytes --]

$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

[-- Attachment #5: patch-src_mips_ffitarget_h --]
[-- Type: text/plain, Size: 352 bytes --]

$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
 

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

* Re: libffi rc3 on openbsd sparc/sparc64/mips64
  2011-02-11 14:27 libffi rc3 on openbsd sparc/sparc64/mips64 Sebastian Reitenbach
@ 2011-02-11 14:35 ` Richard Frith-Macdonald
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Frith-Macdonald @ 2011-02-11 14:35 UTC (permalink / raw)
  To: Sebastian Reitenbach; +Cc: libffi-discuss


On 11 Feb 2011, at 14:26, Sebastian Reitenbach wrote:

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

Would this be when the code passes structure arguments where the structures contain floats/doubles?
I seem to remember that passing those structures used to fail on 64bit intel until the last release of libffi, but I thought a regression test to catch it had been added then.

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

end of thread, other threads:[~2011-02-11 14:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-11 14:27 libffi rc3 on openbsd sparc/sparc64/mips64 Sebastian Reitenbach
2011-02-11 14:35 ` Richard Frith-Macdonald

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