[commit: ghc] cross-compiler-alienless: Checkpointing some makefile simplifications that I attempted. (a18f009)

Ian Lynagh ian at well-typed.com
Fri Sep 14 15:43:07 CEST 2012


On Fri, Sep 14, 2012 at 01:21:45AM +0200, Gabor Greif wrote:
> 
> That is fine, as my branch's main contribution is to interrogate a cross-gcc
> about what those constants are, and to make them available to
> mkDerivedConstants.c.
> 
> Did you look into the mechanism how this is done? In short, I create an .o file
> that has objects whose *size* equals the platform constants. I extract the sizes
> via 'nm' and create the SizeMacros.h. This in turn gets included by
> mkDerivedConstants.c.

I haven't looked, but both configure and hsc2hs also have a way of
calculating the result of constant C integer expressions on other
platforms (by testing whether programs compile). Ideally we will end up
with as few ways of doing that as possible.


Thanks
Ian
-- 
Ian Lynagh, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com/



More information about the Cvs-ghc mailing list