[Haskell-cafe] build and use ghc's rts without a full
unregistered ghc port?
korcan_h at hotmail.com
Sat Jul 24 18:18:28 EDT 2010
I managed to get a hello world app working on the Wii! but I had to do some hacking of the generated C code because the devkitPPC is missing 2 posix headers referenced in the generated C code from Jhc. The functions the code used from those headers didn't seem completely essential. Basically I set the define JHC_isPosix to 0, commented out problem code. Of-course this isn't ideal, the solution would be to implement the missing headers for devkitPPC.
> From: korcan_h at hotmail.com
> To: mwotton at gmail.com
> CC: haskell-cafe at haskell.org
> Subject: RE: [Haskell-cafe] build and use ghc's rts without a full unregistered ghc port?
> Date: Sat, 24 Jul 2010 18:25:56 +0000
> I did initially thought about it and had reservations but you convinced me so I've been trying out jhc. Seems a lot more promising but unfortunately I had problems, here's my targets.ini:
> cflags+=-DGEKKO -mrvl -mcpu=750 -meabi -mhard-float
> Trying to compile a simple hello world haskell program resulted in the following error message:
> hs.out.elf_code.c:118:2: error: #error Could not determine bitsize
> hs.out.elf_code.c:150:24: error: sys/select.h: No such file or directory
> hs.out.elf_code.c:154:25: error: sys/utsname.h: No such file or directory
> For the first error I looked at the line and there is some pre-processor conditional code to determine the word size, this seems a bit odd since i've already specified these in the target.ini I would assume that they would get passed in to the compiler as extra defines.
> More depressing is the last two lines, which looks like a POSIX compatible environment is required with jhc it seems. Having a look at devkitPPC include directory it seems it does implement some POSIX headers but those particular headers certainly do not exist in there.
> Anyway I'll send a message to the jhc mailing list about it.
>> Date: Sat, 24 Jul 2010 20:51:39 +1000
>> Subject: Re: [Haskell-cafe] build and use ghc's rts without a full unregistered ghc port?
>> From: mwotton at gmail.com
>> To: korcan_h at hotmail.com
>> CC: haskell-cafe at haskell.org
>> can't speak as to how difficult it is to get GHC built unregisterised,
>> but you might want to consider JHC if you don't need to use a lot of
>> Hackage. It compiles to C without a special RTS needed, which might
>> make it a lot easier.
>> On Sat, Jul 24, 2010 at 8:45 PM, Korcan Hussein wrote:
>>> Hi, I was just wondering if this is possible, I would like to use a gcc port
>>> which cross compiles to the PPC architecture (Wii DevkitPPC to be specifically:
>>> http://wiibrew.org/wiki/DevkitPPC) for a platform that is not POSIX compatible I
>>> believe (at least not fully or maybe I'm wrong entirely).
>>> Ideally I would make an unregistered port of GHC but the problem is because GHC
>>> doesn't support true cross compiling yet I need to bootstrap on to the target
>>> machine, which isn't running a POSIX environment.
>>> Still I did try to attempt to build with both the host and target set to
>>> 'powerpc-unknown-linux' and build it with devkitPPC, I did use a custom build.mk
>>> which should pull in all the required dependencies, defines, etc for devkitPPC.
>>> In the end I didn't get very far with it, it looked like missing posix functions.
>>> I didn't want to spend to much time trying to make it work this way (maybe i'm
>>> doing it wrong completely). It's quite possible that I could make this work more
>>> easily if I used a linux port for the wii but I would like to avoid the need of
>>> using linux on the wii because I guess most home-brew users don't have such a setup.
>>> So I thought maybe it's possible with less effort to build GHC's RTS and then
>>> compile Haskell in C with the RTS as a library dependency. Is this possible?
>>> maybe I'm missing something or doing something stupid?
>>> Thanks in advance.
>>> We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now_______________________________________________
>>> Haskell-Cafe mailing list
>>> Haskell-Cafe at haskell.org
>> A UNIX signature isn't a return address, it's the ASCII equivalent of a
>> black velvet clown painting. It's a rectangle of carets surrounding a
>> quote from a literary giant of weeniedom like Heinlein or Dr. Who.
>> -- Chris Maeda
> We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
More information about the Haskell-Cafe