diff mbox

[4.4,libffi] fix support for FreeBSD

Message ID alpine.LSU.1.99.1006201857170.9343@acrux.dbai.tuwien.ac.at
State New
Headers show

Commit Message

Gerald Pfeifer June 20, 2010, 5:18 p.m. UTC
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: http://gcc.gnu.org/ml/gcc-testresults/2010-06/msg02062.html

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  <gerald@pfeifer.com>

	Backport from mainline:
	2009-09-17  Loren J. Rittle  <ljrittle@acm.org>

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


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: