Porting to DragonFly BSD
marlowsd at gmail.com
Mon Nov 9 05:44:47 EST 2009
On 06/11/2009 23:25, Goetz Isenmann wrote:
> 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
> 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
> , 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.
Great work. I've added Dragonfly BSD to the list of Tier 2 platforms:
Would you be willing to be the maintainer for GHC on Dragonfly?
We should get these patches into GHC. Most of them look
straightforward, but I'm slightly suspicious of this:
-STANDARD_OPTS += -DCOMPILING_RTS
+STANDARD_OPTS += -DCOMPILING_RTS -D_POSIX_VERSION=199309
why was that necessary?
More information about the Glasgow-haskell-users