XCode and GHC on MacOs X

2004-01-10 Thread Hans Nikolaus Beck
Hi,

Could the XCode Tool from Mac Os X Panther be forced to use ghc instead 
of gcc ? I've found no option to do so, help says nothing about 
switching a compiler...

Greetings

Hans

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: GHC on MacOS X

2002-03-04 Thread Simon Marlow


> 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!).

Great stuff!  You should coordinate with Sigbjorn Finne <[EMAIL PROTECTED]>
who is also working on a MacOS X port, I believe.

> 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.hsStatus: Locally Modified
> File: Socket.hsc  Status: Locally Modified

If you post the patches to [EMAIL PROTECTED], we'll take a look.

> 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?

The right way is to add a wrapper, as you've done.  With proper use of
'inline' you can eliminate any performance reduction too (it's probably
not that big a deal, though).

> 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.

There are/were some problems due to rottage in the unregisterised code
generation path, but I think Sigbjorn has mostly cleaned these up now.
Try updating your CVS tree to get the fixes.

> 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_?

Ok, the mangler really just does two things.  It removes the C function
prologues/epilogues to support tail-calls, and it brings info tables and
entry code next to each other.  You'll get most of the way there by just
setting up a PPC machine-specific section at the start of
mangler/ghc-asm.lprl (there's already a powerpc version for rs6000, I'm
not sure how relevant this is, though).

The other things you need to look at are: 

  - rts/StgCRun.c, which is the tiny layer between C land and
registerised Haskell land, which just saves a few registers
and makes some space on the C stack.  

  - includes/TailCalls.c (probably the defaults for FB_ FE_ and
JMP_() will do).

  - includes/MachRegs.h, which defines the register mapping.
There's one for PPC already, which again may or may not be
relevant.

Be sure to talk to Sigbjorn before diving in though, so as to avoid
duplicating any effort.

Cheers,
Simon
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



Re: GHC on MacOS X

2002-03-03 Thread Wolfgang Thaller

> I realize that you would rather clean things up first, but could I talk
> you 
> into passing on your patches?  We could use a build on MacOS X today (and
> I 
> literally mean today).

It's not easy... when I say "unclean", I _mean_ unclean.
However, here it is...
I even added a new file in a place where it definitely doesn't belong
 - the attached archive contains a "cvs diff" plus the extra file,
sigaddsetwtt.h
(wtt are my initials), which belongs in libraries/base/.
One more thing: the build system passed --split-objs to the compiler for one
or two
library modules (which doesn't work for unregisterd builds). Not knowing
much about
the build system, I simply copied the failed command, removed the
--split-objs and
ran it by hand. Then just ran make again, and everthing went fine.

> Interestingly enough, [...]
> checked in the changes today.  Perhaps the problems that you noticed with 
> your own modules are related to the problems that Sigbjorn fixed.

Thanks for the hint, I'll "check that out" (pun intended).

Wolfgang


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

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

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


ghc-macosx.tar.gz
Description: application/gzip-compressed


Re: GHC on MacOS X

2002-03-02 Thread Ashley Yakeley

At 2002-03-02 14:21, Wolfgang Thaller wrote:

>The results: another unregistered build, a PowerPC implementation
>of createAdjustor (foreign export dynamic now works!).

Excellent! I will be porting JVM-Bridge to it as soon as it's ready.

-- 
Ashley Yakeley, Seattle WA

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



GHC on MacOS X

2002-03-02 Thread Wolfgang Thaller

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.cStatus: Locally Modified
File: ClosureFlags.cStatus: Locally Modified
File: Main.cStatus: Locally Modified
File: Storage.h Status: Locally Modified
File: Posix.hs  Status: Locally Modified
File: Socket.hscStatus: 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

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users