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/ _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
