x86_64 port

Kip Macy kip.macy at gmail.com
Sat Feb 26 03:11:09 EST 2005

> Much of this is done already. Simon Marlow's done the register mapping
> (ghc/includes/MachRegs.h) and done other registerisation work. There
> was a bug in gcc-3.3x that halted things for a while, but this has been
> fixed in 6.4

All the files mentioned except for the Adjustor appear to have x86_64 bits.

> If you felt up to it, it would be a good way to learn about ghc
> internals. Feel free to ask questions on the mailing list, we'll help as
> much as possible.

Sounds interesting, at the moment I just want to get an unregistered
build going.

I've followed the instructions to the letter.

After adding an x86_64-* entry to config.sub in gmp I get the following on 
the target:

copying ./mpn/generic/gcdext.c to mpn/gcdext.c
copying ./mpn/generic/tdiv_qr.c to mpn/tdiv_qr.c
copying ./mpn/generic/bz_divrem_n.c to mpn/bz_divrem_n.c
copying ./mpn/generic/sb_divrem_mn.c to mpn/sb_divrem_mn.c
copying ./mpn/generic/jacbase.c to mpn/jacbase.c
copying ./mpn/generic/gmp-mparam.h to gmp-mparam.h
gmake: *** No rule to make target `AutoApply.hc', needed by `depend'.  Stop.
gmake: Leaving directory `/home/kmacy/ghc-6.2.2/ghc/rts'

The makefile indicates that genapply is called for, but it isn't there,
oddly enough the one on the host failed initially:

kmacy at shemp ./ghc/utils/genapply/genapply
genapply: internal error: stg_ap_v_ret
    Please report this as a bug to glasgow-haskell-bugs at haskell.org,
    or http://www.sourceforge.net/projects/ghc/

but when I rebuilt it it worked - I then copied that over -
Then I got complaints about all the *_hsc.c files missing in the
libraries - hoping
that the compiler itself didn't need them I just touched those files
so the build could continue - the same occurred for .o files under
base/control ...

Am I way off track or is building an unregistered target just really unfriendly?

More information about the Glasgow-haskell-users mailing list