[Haskell-cafe] Re: Compiling GHC for AIX5.1L

Donald Bruce Stewart dons at cse.unsw.edu.au
Fri Oct 1 19:53:58 EDT 2004

> In gmane.comp.lang.haskell.cafe, you wrote:
> > jgoerzen:
> >>  /mpn'
> >
> > It could be that gmp is a bit too old for your platform. This has been
> Turns out that both ghc and gmp are confused about the true nature of
> the platform.  It is AIX on PowerPC64, running in 32-bit mode.  After
> significant tweaking to Makefiles (to add -mpowerpc all over the place),
> things seem to work.  I hope I'll actually have it built later today.
> Sigh.

This sounds like a similar issue I had on mips64-irix. It wants to run
in 32bit mode, but I have to add compiler flags all over the place to
get all the tools to use 64 bits. You may need to use similar settings.

Most of the flags can be set in mk/build.mk:

        # C compiler flags

        # Haskell compiler flags, for gcc, and ld
        SRC_HC_OPTS+=-optc-mabi=64 -opta-mabi=64 -optl-mabi=64


And the following env vars were needed to be set to help out configure:

        export LDFLAGS="-L/usr/freeware/lib64 -mabi=64"
        export CPPFLAGS="-I/usr/freeware/include"
        export CFLAGS=-mabi=64

        # make sure we use 64bit linker
        export LD="/usr/bin/ld -64"

And once this is all built, I need to set some flags in
ghc/rts/package.conf, in order to have the correct flags passed through
for each future Haskell binary you build.

> Thanks for your help, though.  It is appreciated.  I will post the built
> tree once I have a working ghc.

Cool. And send in patches too :)

-- Don

More information about the Haskell-Cafe mailing list