From 58b59d5ee7ac732d67736bc3654b6dc6c9af9e44 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 15 Jan 2015 13:01:21 -0800 Subject: [PATCH] re PR libffi/64572 (r219477 breaks bootstrap on x86_64 darwin) PR libffi/64572 * include/ffi.h.in (FFI_TYPE_LAST): Set to COMPLEX only if complex numbers are supported by the backend. From-SVN: r219688 --- libffi/ChangeLog | 6 ++++++ libffi/include/ffi.h.in | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/libffi/ChangeLog b/libffi/ChangeLog index 6893ac5e976..562e5383b7d 100644 --- a/libffi/ChangeLog +++ b/libffi/ChangeLog @@ -1,3 +1,9 @@ +2015-01-15 Richard Henderson + + PR libffi/64572 + * include/ffi.h.in (FFI_TYPE_LAST): Set to COMPLEX only if complex + numbers are supported by the backend. + 2015-01-13 Kaz Kojima * configure.host: Remove extra brackets for sh. diff --git a/libffi/include/ffi.h.in b/libffi/include/ffi.h.in index c43d52fd51f..191aef7bd3f 100644 --- a/libffi/include/ffi.h.in +++ b/libffi/include/ffi.h.in @@ -494,7 +494,13 @@ void ffi_call(ffi_cif *cif, #define FFI_TYPE_COMPLEX 15 /* This should always refer to the last type code (for sanity checks) */ -#define FFI_TYPE_LAST FFI_TYPE_COMPLEX +/* ??? Ideally, anyway. There are assembly files that still depend + on this not including COMPLEX. */ +#ifdef FFI_TARGET_HAS_COMPLEX_TYPE +# define FFI_TYPE_LAST FFI_TYPE_COMPLEX +#else +# define FFI_TYPE_LAST FFI_TYPE_POINTER +#endif #ifdef __cplusplus } -- 2.30.2