
Thanks a lot for this job and thanks a lot to everyone working on cross-compilation capability of GHC! Using GHC HEAD just after Simon M patch I've been able to cross-compile it from i386-solaris to x86_64-solaris for the first time. I've attempted this port a year or two ago doing it the old way, but miserably failed. Today this was just a hour or so task. Three patches for this needed are already submitted. Hello world is working: $ ./inplace/bin/ghc-stage2 --make HelloWorld.hs [1 of 1] Compiling Main ( HelloWorld.hs, HelloWorld.o ) Linking HelloWorld ... karel@silence:~/vcs/ghc-src/ghc-head$ file HelloWorld HelloWorld: ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, not stripped karel@silence:~/vcs/ghc-src/ghc-head$ ldd HelloWorld libgmp.so.3 => /usr/lib/64/libgmp.so.3 libm.so.2 => /lib/64/libm.so.2 librt.so.1 => /lib/64/librt.so.1 libdl.so.1 => /lib/64/libdl.so.1 libc.so.1 => /lib/64/libc.so.1 karel@silence:~/vcs/ghc-src/ghc-head$ ./HelloWorld Hello World! karel@silence:~/vcs/ghc-src/ghc-head$ The only issue I see with it is that I'm not able to perform another clean build of GHC HEAD using this amd64 compiler since genprimopcode segfaults on me. gmake[1]: Nothing to be done for `phase_0_builds'. ===--- building phase 1 gmake -r --no-print-directory -f ghc.mk phase=1 phase_1_builds libraries/hpc/ghc.mk:3: libraries/hpc/dist-boot/build/.depend-v.haskell: No such file or directory compiler/ghc.mk:439: compiler/stage1/build/.depend-v.haskell: No such file or directory "inplace/bin/genprimopcode" --data-decl < compiler/stage1/build/primops.txt > compiler/stage1/build/primop-data-decl.hs-incl gmake[1]: *** [compiler/stage1/build/primop-data-decl.hs-incl] Segmentation Fault (core dumped) gmake[1]: *** Deleting file `compiler/stage1/build/primop-data-decl.hs-incl' gmake: *** [all] Error 2 Anyway, thanks a lot for this fantastic job! Karel On 01/17/13 02:00 PM, Simon Marlow wrote:
Cross-compilers please take note:
On 17/01/13 12:57, Simon Marlow wrote:
Before ------
To build a cross-compiler: ./configure --target=<..>
To compile a foreign GHC: ./configure --host=<..> --target=<..>
Now ---
To build a cross-compiler: ./configure --target=<..> And set "Stage1Only=YES" in mk/build.mk
To compile a foreign GHC: ./configure --target=<..>
Cheers, Simon
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs