[comp.sys.mac.programmer] Free C compiler for Mac ?

ews00461@uxa.cso.uiuc.edu (07/11/90)

I know: this has been discussed before...

It would be so nice to have a free C compiler available on the
Mac.  I know it's hard.  I understand some of just why it is
hard.  But it CAN be done.  I'm interested in anyone's opinions
on the subject.

Break the task into 2 pieces:
	1.  Get the compiler to compile and run
	2.  Get the output of the compiler to run

Consider PDC:
	This one originally appeared in Dr. Dobb's.  It runs on the
	Amiga, available on some Fred Fish Disk I think.
	Step 1 is easy.  I've done it.  PDC produces assembler source
	code, which is then rather difficult to get running.
	It could be done with libraries written and the like.
	There are other 68000 compilers around which would be
	a similar task to this one.

Consider GCC:
	As I understand it, even step 1 for this beast is very hard.
	Can anyone who has attempted this elaborate?  For step 2,
	we probably need an assembler to handle GCC's output (port
	GAS ?), then a linker (scratch, or convert GAS to handle
	MPW linker format).  The compiler needs to understand
	Pascal calling conventions, and be able to generate
	absolutely relocatable code even when globals are >32k.
	Global initialization routines must be written by the
	compiler (I know there are other ways...)  It would be nice
	if the compiler generated toolbox traps inline.  Any
	optimizations which create non-relocatable code need
	to be disabled.  Some support for segmentation needs to
	be implemented.

I know this is a big task.  I understand someone at Apple has
done it (within MPW) and they won't release it.  The Mac is
a difficult machine to write a compiler for.  But a free C compiler
that would be available to all would be great.

Not to slight Sesame C, but I was envisioning something more
powerful, and something supporting ToolBox calls in standard
format, and something free, with updates available to all.

No flames, please, but let me know if I am way out of line.
The Atari ST has GCC.  The Amiga has 3 free C compilers with
GCC on the way.  All UNIX boxes potentially have GCC.  I
like the Mac.  I'd like it more if it had a free C compiler.

Eric W Sink
e-sink@uiuc.edu