Porting GHC to powerpc-unknown-linux

Lunar lunar@lautre.net
Thu, 4 Sep 2003 13:16:48 +0200


=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 04 September 2003 01:45, Donald Bruce Stewart wrote:
> I did something very slightly incorrect, I think, though I don't
> know what it was, because I got a working cross-port to freebsd
> yesterday, on a box that had previously given me the stg_ap_v_ret
> error. See yesterday's post of mine on that.

Ok, I made another try today, here is the detailed report :

lunar@moon:~$ uname -a
Linux moon 2.4.22-ben1 #1 Wed Aug 27 13:00:30 CEST 2003 ppc GNU/Linux
lunar@moon:~$ wget http://www.haskell.org/ghc/dist/6.0.1/ghc-6.0.1-src.tar.=
bz2
lunar@moon:~$ md5sum ghc-6.0.1-src.tar.bz2
6e258de758b34905ecfc636a38fa9e23  ghc-6.0.1-src.tar.bz2
lunar@moon:~$ tar jxf ghc-6.0.1-src.tar.bz2
lunar@moon:~/ghc-6.0.1$ vim configure.in
=2D ---
Adding this at line 294
powerpc-unknown-linux*)
        HostPlatform=3Dpowerpc-unknown-linux
        TargetPlatform=3Dpowerpc-unknown-linux
        BuildPlatform=3Dpowerpc-unknown-linux
        HostPlatform_CPP=3D'powerpc_unknown_linux'
        HostArch_CPP=3D'powerpc'
        HostVendor_CPP=3D'unknown'
        HostOS_CPP=3D'linux'
        ;;
=2D ---
lunar@moon:~/ghc-6.0.1$ autoreconf2.50
lunar@moon:~/ghc-6.0.1$ ./configure --enable-hc-boot --enable-unregisterised
lunar@moon:~/ghc-6.0.1$ cd ghc/includes/
lunar@moon:~/ghc-6.0.1/ghc/includes$ make config.h

lunar@reglisse:~$ uname -a
Linux reglisse 2.4.18-686-smp #1 SMP Sun Apr 14 12:07:19 EST 2002 i686 unkn=
own
lunar@reglisse:~$ wget=20
http://www.haskell.org/ghc/dist/6.0.1/ghc-6.0.1-src.tar.bz2
lunar@reglisse:~$ md5sum ghc-6.0.1-src.tar.bz2
6e258de758b34905ecfc636a38fa9e23  ghc-6.0.1-src.tar.bz2
lunar@reglisse:~$ tar jxf ghc-6.0.1-src.tar.bz2
lunar@reglisse:~/ghc-6.0.1$ ./configure
lunar@reglisse:~/ghc-6.0.1$ vim mk/build.mk

lunar@moon:~/ghc-6.0.1/ghc/includes$ scp config.h=20
lunar@reglisse:ghc-6.0.1/ghc/includes

lunar@reglisse:~/ghc-6.0.1$ vim mk/config.mk
=2D ---
TARGETPLATFORM                  =3D powerpc-unknown-linux
LeadingUnderscore=3DNO
=2D ---
lunar@reglisse:~/ghc-6.0.1$ vim libraries/mk/boilerplate.mk
lunar@reglisse:~/ghc-6.0.1$ vim hslibs/mk/boilerplate.mk
=2D ---
Add Ian's AR, LD and SRC_HC_OPTS hack.
=2D ---
lunar@reglisse:~/ghc-6.0.1$ (cd glafp-utils && make boot && make)
lunar@reglisse:~/ghc-6.0.1$ (cd ghc && make boot && make)
lunar@reglisse:~/ghc-6.0.1$ (cd libraries && make boot && make)
lunar@reglisse:~/ghc-6.0.1$ vim ghc/mk/boilerplate.mk
=2D --- Still adding Ian's hack
lunar@reglisse:~/ghc-6.0.1$ (cd ghc && make boot stage=3D2 && make stage=3D=
2)
lunar@reglisse:~/ghc-6.0.1/ghc/utils$ make clean
lunar@reglisse:~/ghc-6.0.1/ghc/utils$ make -k=20
HC=3D~/ghc-6.0.1/ghc/compiler/stage1/ghc-inplace EXTRA_HC_OPTS=3D'-O -fvia-=
C=20
=2D -keep-hc-files'
lunar@reglisse: ~/ghc-6.0.1$ make hc-file-bundle Project=3DGhc

lunar@moon:~/ghc-6.0.1/distrib$ wget -O hc-build=20
http://cvs.haskell.org/cgi-bin/cvsweb.cgi/~checkout~/fptools/distrib/hc-bui=
ld?rev=3D1.20
lunar@moon:~$ scp=20
lunar@reglisse:ghc-6.0.1/ghc-6.0.1-powerpc-unknown-linux-hc.tar.gz .
lunar@moon:~$ tar zxf ghc-6.0.1-powerpc-unknown-linux-hc.tar.gz
lunar@moon:~/ghc-6.0.1$ ./distrib/hc-build --enable-hc-boot-unregisterised
[...]
=2E./../ghc/utils/ghc-pkg/ghc-pkg-inplace --update-package <package.conf.in=
place
ghc-pkg.bin: internal error: stg_ap_v_ret
    Please report this as a bug to glasgow-haskell-bugs@haskell.org,
    or http://www.sourceforge.net/projects/ghc/
gmake[1]: *** [../../ghc/driver/stamp-pkg-conf-base] Error 254
gmake: *** [boot] Error 1
gmake: Leaving directory `/home/lunar/ghc-6.0.1/libraries'

I just saw today a binary version of GHC 5.04.3 for Linux/PPC. My next try=
=20
will be to bootstrap from that one.

Lunar.
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/Vx8id1rcjNWgdWQRAidMAJ9S/TfDm8mPpp2Gdl05SNugYFVLGwCgoI0h
q3Wf2Kp//DBxiE+fOu4VHO4=3D
=3Dwbf5
=2D----END PGP SIGNATURE-----