Debian/sh4 で haskell (ghc) をbootstrapするメモ
以下にやり方がかいてある。 http://hackage.haskell.org/trac/ghc/wiki/Building/Porting
7.x は bootstrap できない(壊れている)ので 6.12.x を使う。
ターゲットマシン上で
$ sudo apt-get install autoconf automake $ sudo apt-get build-dep ghc $ export CFLAGS=-mieee $ cp /bin/pwd utils/ghc-pwd/ghc-pwd $ perl boot $ ./configure --enable-hc-boot --build=sh4-linux --host=sh4-linux --target=sh4-linux $ echo "SRC_CC_OPTS += -mieee" >> mk/build.mk $ cd libraries/integer-gmp $ ./configure $ cd ../.. $ make bootstrapping-files
1行で行う用メモ。 export CFLAGS=-mieee ; rm mk/build.mk ; cp /bin/pwd utils/ghc-pwd/ghc-pwd ; perl boot ; ./configure --enable-hc-boot --build=sh4-linux --host=sh4-linux --target=sh4-linux ; echo "SRC_CC_OPTS += -mieee" > mk/build.mk ; cd libraries/integer-gmp ; ./configure ; cd ../.. ; make bootstrapping-files
- ホストマシン上で aclocal.m4 を修正する。
diff --git a/aclocal.m4 b/aclocal.m4
index bfd91fc..54b9cd9 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -123,7 +123,7 @@ AC_DEFUN([FP_COMPUTE_INT],
# A variation of AC_CHECK_SIZEOF for computing the alignment restrictions of a
# given type. Defines ALIGNMENT_TYPE.
AC_DEFUN([FP_CHECK_ALIGNMENT],
-[AS_LITERAL_IF([$1], [],
+[AS_LITERAL_IF(m4_translit(?$1, [*], [p]), [],
[AC_FATAL([$0: requires literal arguments])])[]dnl
AC_CHECK_TYPE([$1], [], [], [$3])[]dnl
m4_pushdef([fp_Cache], [AS_TR_SH([fp_cv_alignment_$1])])[]dnl