From patchwork Sun Jun 20 17:18:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [4.4,libffi] fix support for FreeBSD Date: Sun, 20 Jun 2010 07:18:58 -0000 From: Gerald Pfeifer X-Patchwork-Id: 56267 Message-Id: To: gcc-patches@gcc.gnu.org Cc: Loren James Rittle 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 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: #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: