[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#481628: Acknowledgement (FTBFS on mips/mipsel)



Arthur Loiret wrote:
> Hi Thiemo,
> 
> On Sat, May 17, 2008 at 04:13:20PM +0200, Arthur Loiret wrote:
> > With this patch /usr/include/mips64-linux-gnu/ is installed in both
> > libn32ffi-dev and lib64ffi-dev, please wait for my next patch.
> 
> Here is the diff between header from mips and mips64 builds (it is the same for
> mips64 and mipsn32). Do you have a comment to make on that? Since the last
> fully build (3.0.5-1) this is the mips64 version installed in /usr/include/ffi.h,
> and no other version installed.
> 
> 
> --- build/include/ffi.h	2008-05-17 14:31:24.000000000 +0000
> +++ build64/include/ffi.h	2008-05-17 14:32:06.000000000 +0000
> @@ -158,9 +158,9 @@
>  extern ffi_type ffi_type_float;
>  extern ffi_type ffi_type_double;
>  extern ffi_type ffi_type_pointer;
>  
> -#if 0
> +#if 1
>  extern ffi_type ffi_type_longdouble;
>  #else
>  #define ffi_type_longdouble ffi_type_double
>  #endif
> @@ -366,9 +366,9 @@
>  #define FFI_TYPE_VOID       0    
>  #define FFI_TYPE_INT        1
>  #define FFI_TYPE_FLOAT      2    
>  #define FFI_TYPE_DOUBLE     3
> -#if 0
> +#if 1
>  #define FFI_TYPE_LONGDOUBLE 4
>  #else
>  #define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
>  #endif

This look wrong. To my knowledge, all three Linux/MIPS ABIs use
"long double" as an alias to "double". I infer from the libffi
implementation that IRIX6 uses 128 bit doubles, and some special
casing for linux is needed.

Apart from that, the header file should be the same for all ABIs
(and use _MIPS_SIM conditionals where appropriate) in order to
keep things maintainable, and to avoid problems like this one.


Thiemo



Reply to: