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

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.