Summary of current change suggestions

Fergus Henderson fjh at
Fri Feb 23 12:23:18 EST 2001

On 23-Feb-2001, Simon Marlow <simonmar at> wrote:
> I agree.  Would it be fixed by just #including Stg.h after any
> -#includes, or would that create more problems?

ghc uses gcc global register variables on x86, doesn't it?

If so, they need to be declared first thing, before any function
definitions; and system headers often define inline functions.
So if Stg.h declares global register variables, they need to
come first.  You may need to split Stg.h into the part which
declares the global register variables, and the remainder,
and put just the first part before the user's #includes.

Another (probably better) alternative is to pass the `-ffixed-<reg>'
option to gcc to reserve the registers.

Fergus Henderson <fjh at>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <>  |     -- the last words of T. S. Garp.

More information about the FFI mailing list