This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[4.4, libffi] fix support for FreeBSD
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Loren James Rittle <rittle at labs dot mot dot com>
- Date: Sun, 20 Jun 2010 19:18:58 +0200 (CEST)
- Subject: [4.4, libffi] fix support for FreeBSD
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.
Installed.
Gerald
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.
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:
#endif
-#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: