porting ghc-6.4 to x86_64
Andrei A. Voropaev
av at simcon-mt.com
Tue Mar 22 05:10:18 EST 2005
On Tue, Mar 22, 2005 at 11:03:58AM +0100, Andrei A. Voropaev wrote:
> On Tue, Mar 22, 2005 at 09:38:20AM -0000, Simon Marlow wrote:
> > On 22 March 2005 09:24, Andrei A. Voropaev wrote:
> > > On Tue, Mar 22, 2005 at 10:06:13AM +0100, Andrei A. Voropaev wrote:
> > >> On Mon, Mar 21, 2005 at 02:20:25PM -0000, Simon Marlow wrote:
> > >> [...]
> > >>>>> Did you copy across ghc/includes/DerivedConstants.h and
> > >>>>> ghc/includes/GHCConstants.h from the target to the host? I think
> > >>>>> that should fix the above error (the docs do say you have to do
> > >>>>> this, so perhaps it's something else).
> > >>>>
> > >>>> Sure enough I did. As I said, I carefully followed the
> > >>>> instructions. I repeated the whole process 3 times to make sure I
> > >>>> didn't forget something :)
> > >>>
> > >>> So could you check the values of SIZEOF_VOID_P (in ghcautoconf.h)
> > >>> and SIZEOF_mp_limb_t (in DerivedConstants.h)? They should both be
> > >>> 8 in the versions of these files copied from the target.
> > >>
> > >> Aha. The values are different. Carefull watching of the
> > >> DerivedConstants.h showed that it was overwritten when I did 'cd
> > >> H/ghc && make boot'. And yes, I did touch of all the copied files.
> > >
> > > Even worse. This file gets overwritten on subsequent steps as well.
> > > So, my attempts to copy the correct one from the T machine again and
> > > again fail.
> > Ok, looks like I need to update the instructions. Does this sequence
> > work:
> > - cd H/ghc/includes && make boot
> > - copy files from T/ghc/includes to H/ghc/includes
> > - touch the files
> > - cd H/ghc/includes && make <<-- should do nothing now
> Nope. It does not. The last step still recreates DerivedConstants.h
Well, looking at the makefile it becomes clear, that it must do so.
# Make DerivedConstants.h for the compiler
all :: DerivedConstants.h
mkDerivedConstants.c : $(H_CONFIG)
mkDerivedConstantsHdr : mkDerivedConstants.o
$(CC) -o $@ $(CC_OPTS) $(LD_OPTS) mkDerivedConstants.o
DerivedConstants.h : mkDerivedConstantsHdr
CLEAN_FILES += mkDerivedConstantsHdr$(exeext) DerivedConstants.h
Since ghcautoconf.h is new this triggers update for mkDerivedConstants.c
which in turn updates mkDerivedConstantsHdr which in turn updates
DerivedConstants.h. I guess I should also touch the mkDerivedConstants.c
to avoid the updates. Am I correct?
Minds, like parachutes, function best when open
More information about the Glasgow-haskell-users