(mips64el) Cross-building GHC

jugree at lavabit.com jugree at lavabit.com
Thu Jan 10 00:11:48 CET 2013


Hello.

I would like to port GHC to mips64el. I have never tried
cross-building before. So I will probably post more questions later.

Actually, I am not sure that I am using the right term. I am going to
use my i686 machine to build GHC for mips64el. In terms of this
page(0):

B = i686-unknown-linux
H = mips64el-unknown-linux
T = mips64el-unknown-linux

Is the above correct?

What I did:

1. Downloaded this(1) tarball (on i686) and unpacked it.
2. Executed the following commands(2):

ghc-7.6.1$ cp /bin/pwd utils/ghc-pwd/ghc-pwd
ghc-7.6.1$ perl boot
ghc-7.6.1$ ./configure --enable-hc-boot --build=i686-unknown-linux
--host=mips64el-unknown-linux --target=mips64el-unknown-linux

Output:

checking for gfind... no
checking for find... /usr/bin/find
checking for sort... /usr/bin/sort
checking for ghc... /usr/bin/ghc
checking version of ghc... 6.12.1
checking build system type... i686-unknown-linux-gnu
checking host system type... mips64el-unknown-linux-gnu
checking target system type... mips64el-unknown-linux-gnu
HOST: mips64el-unknown-linux-gnu
GHC build  : i386-unknown-linux
GHC host   : mips-unknown-linux
GHC target : mips-unknown-linux
configure: Building in-tree ghc-pwd
ghc: unrecognised flags: -no-user-
Usage: For basic information, try the `--help' option.
configure: error: Building ghc-pwd failed

/ghc-7.6.1$ grep "no-user" ./*
./aclocal.m4:    if ! "$WithGhc" -v0 -no-user-$GHC_PACKAGE_DB_FLAG -hidir
utils/ghc-pwd/dist-boot -odir utils/ghc-pwd/dist-boot -stubdir
utils/ghc-pwd/dist-boot --make utils/ghc-pwd/Main.hs -o
utils/ghc-pwd/dist-boot/ghc-pwd
./configure:    if ! "$WithGhc" -v0 -no-user-$GHC_PACKAGE_DB_FLAG -hidir
utils/ghc-pwd/dist-boot -odir utils/ghc-pwd/dist-boot -stubdir
utils/ghc-pwd/dist-boot --make utils/ghc-pwd/Main.hs -o
utils/ghc-pwd/dist-boot/ghc-pwd

How can I fix this? I can't find any information about this option.

Thank you.

PS: I only use free software (as defined by the FSF). Can I be sure
that I won't install any non-free programs during the process?

(0) http://hackage.haskell.org/trac/ghc/wiki/CrossCompilation
(1) http://www.haskell.org/ghc/dist/7.6.1/ghc-7.6.1-src.tar.bz2
(2) http://hackage.haskell.org/trac/ghc/wiki/Building/Porting





More information about the Glasgow-haskell-users mailing list