GHC on MacOS X

Wolfgang Thaller wolfgang.thaller@gmx.net
Sat, 2 Mar 2002 23:21:36 +0100 (MET)


Hello all,

I've spent a day compiling ghc (5.03, checked out from CVS a few days ago)
on MacOS X 10.1.
The results: another unregistered build, a PowerPC implementation
of createAdjustor (foreign export dynamic now works!).

I needed to modify a total of six files:
File: Adjustor.c       	Status: Locally Modified
File: ClosureFlags.c   	Status: Locally Modified
File: Main.c           	Status: Locally Modified
File: Storage.h        	Status: Locally Modified
File: Posix.hs         	Status: Locally Modified
File: Socket.hsc       	Status: Locally Modified

Most of my modifications are ugly hacks, I still need to clean them up.
I would appreciate some advice on how to do that and how to submit
them for inclusion.
Yes, I can read the man page for diff, but are there other things I need to
know when sending in a patch?

Socket.hsc refused to compile because on MacOS X, sigaddset() is a macro
that chokes if its parameter is a void*. I added a wrapper function in a
small C header file, but that's really ugly. What's the "proper" way?

And for some reason, Apple's version of gcc refused to accept the
non-standard
syntax used in ClosureFlags.c.

My modifications in Main.c and Storage.h are closely based on those in the
MacOS X compile of GHC 5.00.2.

I also got a compiler panic on one of my own modules I tried to compile.
I'll post that to ghc-bugs, as I somehow don't think it has to do with
the PPC port.

What I really need, of course, is a registered compiler... I'm even prepared
to learn some Perl to do that, but for now I don't really have a clue what
to
do - I don't know enough about Intel/Sparc assembly language and runtime
conventions to find out from the code without a few hints - can anyone
give me a few pointers what the mangler is supposed to do _exactly_?

CU,

Wolfgang Thaller

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net