
On Sun, 2009-01-11 at 14:48 +0000, Duncan Coutts wrote:
I built four versions of gcc and used them to build ghc-6.8.3.
While on the subject, the annoyances I bumped into while doing this are: discovering a ghc/gcc combination does not work is not obvious. The first symptom is ./configure failing to find the path to top of build tree. Of course I realised this happened to be because we build a Haskell pwd program during configure. It'll confuse other users. It would be nice if after detecting the location and version of ghc, ./configure would explicitly test that ghc to make sure it can compile, link and run a hello world program. Each of these stages can fail. On different occasions I've managed to get all three stages to fail independently so it would be nice if each were checked explicitly. The compile phase can fail if the ghc/gcc combo is bad. The link phase can fail if the ghc cannot find libgmp/libreadline/libwhatever. The run phase can fail if the ghc/gcc combo generated bad code or if the libgmp is not on the runtime linker path but was on the static linker path. It's rather tricky to configure ghc to use libraries from a non-standard location, one that is not on the standard linker link-time or runtime paths. See http://hackage.haskell.org/trac/ghc/ticket/2933 It's tricky to get configure ghc to use gcc from a non-standard location. The ./configure --with-gcc flag works for gcc used at build time but the installed ghc still uses ghc from the $PATH. Duncan