Patchwork [4.4,libffi] fix support for FreeBSD

mail settings
Submitter Gerald Pfeifer
Date June 20, 2010, 5:18 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/56267/
State New
Headers show


Gerald Pfeifer - June 20, 2010, 5:18 p.m.
While mostly looking for something else, I noticed this patch Loren had
contributed to GCC 4.5 and later that we are missing on GCC 4.4 (which
is now the primary non-system compiler on FreeBSD).

Tested on i386-unknown-freebsd9.0, the expected passes for libjava grow
from 2475 to 2477, expected failures and unsupported testcases down by
one each:

Still, results on the 4.4 branch are a lot worse than on HEAD, but then
there have been a lot of improvements there in the last year.



2010-06-20  Gerald Pfeifer  <>

	Backport from mainline:
	2009-09-17  Loren J. Rittle  <>

	PR testsuite/32843 (strikes again)
	src/x86/ffi.c (ffi_prep_cif_machdep): Add X86_FREEBSD to
	enable proper extension on char and short.


Index: src/x86/ffi.c
--- src/x86/ffi.c	(revision 161046)
+++ src/x86/ffi.c	(working copy)
@@ -123,7 +123,7 @@ 
 #ifdef X86
     case FFI_TYPE_STRUCT:
-#if defined(X86) || defined(X86_DARWIN)
+#if defined(X86) || defined(X86_DARWIN) || defined(X86_FREEBSD)
     case FFI_TYPE_UINT8:
     case FFI_TYPE_UINT16:
     case FFI_TYPE_SINT8: