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

Re: FFI vacall fails check.



Geoff Reynolds <geoff@codeworks.gen.nz> writes:

> At the end of the configuration:
>   [...]
>   gcc -O  -I. -I../../ffcall/vacall -c ../../ffcall/vacall/tests.c
>   gcc -O  tests.o vacall.o misc.o structcpy.o -o tests
>   ./tests > tests.out
>   uniq -u < tests.out > tests.output.i386-unknown-linux
>   test '!' -s tests.output.i386-unknown-linux
>   make: *** [check] Error 1

The calling convention for C functions returning structures of size > 8 bytes
apparently has changed between gcc-2.6.3 and gcc-2.7 (all i386 platforms),
and vacall supports only the old one. Since gcc-2.8 will switch back to
gcc-2.6.3's calling convention, I won't change ffcall/vacall for this.

> However I would like to build with the
> --dynamic-ffi package, to interface with C code.

To do this, you should temporarily remove the X_BcdB test in
ffcall/vacall/tests.c, and retry. Returning structures > 8 bytes by value
will not work, however.

                        Bruno