Re: [Pkg-haskell-maintainers] libffi changes - help needed
Joachim Breitner wrote:
I know little about libffi and what the actually issue is
The issue is that for some reason the designers of arm eabi included
the following rule.
"A variadic function is always marshaled as for the base standard."
The implication of this is that any variant of EABI other than the
base standard (such as the variant used by armhf) will marshall
functions differently depending on whether they are variadic or
not. In the particular case of armhf a non-variadic function will
pass floating point variables in VFP registers (or on the stack
when VFP registers run out) while a variadic function will pass
them in integer registers (or on the stack when integer registers
Which in turn means anything that calls a function (whether
calling them directly or calling them through a wrapper like
libffi) must know if they are variadic or not. For direct calls
from C this information is given in the function prototype.
>I believe, though, that to fix this issue
>you will only have to worry about the run time system of Haskell,
>implemented in C, and not touch any Haskell code.
That depends if the runtime system already has enough information
to know if the functions it is trying to call are variadic or not. If it
doesn't then changes would be needed to pass the information
to the runtime.