This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: libffi for i386-*-freebsd*


(Resent to upstream, now that I noticed that there is an upstream.)

I wondered why saw this [in recent gcc 4.5 test results for i386-*-freebsd*]:

FAIL: libffi.call/return_sc.c -O2 -O2 execution test
FAIL: libffi.call/return_sc.c -O3 -O3 execution test
FAIL: libffi.call/return_sc.c -Os -Os execution test
FAIL: libffi.call/return_sc.c -O2 -fomit-frame-pointer -O2 -fomit-frame-pointer execution test

on i386-unknown-freebsd7.2 with gcc mainline.  Fixed with this (as
commited to [gcc] mainline after testing against -r151782):

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: libffi/src/x86/ffi.c
===================================================================
--- libffi/src/x86/ffi.c	(revision 151782)
+++ libffi/src/x86/ffi.c	(working copy)
@@ -155,7 +155,7 @@
 #ifdef X86
     case FFI_TYPE_STRUCT:
 #endif
-#if defined(X86) || defined (X86_WIN32) || defined(X86_DARWIN) || defined(X86_WIN64)
+#if defined(X86) || defined (X86_WIN32) || defined(X86_FREEBSD) || defined(X86_DARWIN) || defined(X86_WIN64)
     case FFI_TYPE_UINT8:
     case FFI_TYPE_UINT16:
     case FFI_TYPE_SINT8:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]