Re: [PATCH] define own version of PRIdPTR on platform where its not available
Ian Lynagh <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.cvs.ghc |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Nov 05, 2012 at 10:02:08AM +0000, Simon Marlow wrote: > On 03/11/2012 00:16, Ian Lynagh wrote: > > > >However, I'm hoping to replace mkDerivedConstants.c with probably a > >configure script soon, so that it can produce the right results when > >cross-compiling. > > Yes we need to replace mkDerivedConstants.c with something else for > cross compilation, but I really hope it doesn't have to be a > configure script :-) Surely it's possible to convince the C > compiler to emit struct offsets without having to run the program, > somehow? Well, we currently do the same sort of thing with configure scripts already, e.g. configure creates SIZEOF_INT and mkDerivedConstants makes SIZEOF_StgArrWords_NoHdr. I don't feel strongly about how we do it, but we should do it the same way in both places. Thanks Ian