
On Wed, Nov 04, 2009 at 03:08:27PM +0000, Colin Adams wrote:
When GHC 6.12.1 is released, I'm going to have a go at porting it to DragonFly BSD (32-bit incarnation). Is the porting page on the wikiup-to-date?
Maybe you could start with something like: $ curl -o ghc-6.10.4-3.tar.bz2 \ ; http://www.goetz-isenmann.de/dfly/ghc-6.10.4-3.tar.bz2 $ curl -o cabal http://www.goetz-isenmann.de/dfly/cabal $ tar xzf ghc-6.10.4-3.tar.bz2 -C /var/tmp/isenmann $ PATH=/var/tmp/isenmann/ghc-6.10.4-3/bin:$PATH $ ./cabal update $ ./cabal install --user cabal-install I have just recompiled this ghc with itself using the attached patches and --prefix=/var/tmp/isenmann on dragonfly 2.4.1 (32bit). The patches are only a stupid "do the same for dragonfly as for freebsd" with two exceptions AFAIR: (a) use -pthread not -lthr, and (b) this -D_POSIX_VERSION=199309 in rts/Makefile, that's most probably the wrong way to fix a (can't remember the details) build problem. Until now I had no time and energie to dig deeper into the problem [1], that looks to me, like rts/Linker cannot load any object file that references errno. My guess is, that for dragonflys "extern __thread int errno;" we do not only need to add a new case in rts/Linker.c but also need to generate different code for this thread local storage access. Goetz [1] $ ghci GHCi, version 6.10.4: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer ... linking ... done. ghc: /var/tmp/isenmann/ghc-6.10.4-3/lib/ghc-6.10.4/base-4.1.0.0/HSbase-4.1.0.0.o: unhandled ELF relocation(Rel) type 15 Loading package base ... linking ... ghc: unable to load package `base'