public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Stan Shebs <shebs@apple.com>
To: Michael Sokolov <msokolov@ivan.Harhan.ORG>
Cc: binutils@sources.redhat.com, gcc@gcc.gnu.org
Subject: Re: m68k MacOS target support?
Date: Tue, 12 Sep 2000 19:44:00 -0000	[thread overview]
Message-ID: <39BEEA00.1B481229@apple.com> (raw)
In-Reply-To: <0009130141.AA15271@ivan.Harhan.ORG>

Michael Sokolov wrote:
> 
> I can't say anything for sure until I get the sources for Stan Shebs' two ports
> and get answers to the questions about the C library and the headers, but it
> looks like as the m68k port maintainer I'll be able to create a UNIX-hosted
> MacOS-targeting port with very little additional work beyond what I would have
> to do anyway for other projects that interest me, and thus it would be
> imprudent for me as the m68k port maintainer not to do so. This port would be
> very good from the GNU viewpoint (full proper current GCC and Binutils), but
> would do very little from the Mac viewpoint other than letting you call MacOS
> APIs yourself with no involvement from the compiler. I would use Cygnus Newlib,
> and all of its free-standing embedded functionality would be fully working,
> which is great, but not being a Mac programmer and having no interest in the
> actual Mac business, I'm the wrong guy to ask for things like implementing
> UNIX-like open, read, write, console I/O, etc. on top of MacOS or for hosting
> on MacOS.

I'm afraid it won't be quite that simple.  You still have to conform to the
Mac ABI, which has a very particular format for function calls, variable
refs, and so forth.  Also, much of the functionality, such as opening a
window, is only available through traps which have to be passed arguments
in particular registers (which seemed like a great idea for personal computers
ca 1980 when all this was first designed...).  Since there's no console
equivalent on Macs, you can only do stdio by providing your own console
library, similar to MPW's SIOW or MW's Sioux libraries, which are proprietary,
there may be a free one out there by now.

> I wonder, how would this compare to what most proprietary Mac compilers offer
> in terms of the C library? (I'm not a Mac person and have never used any, so I
> don't know.) Do they offer free-standing functions that are better or worse
> than Cygnus Newlib? Do they offer open, read, write, etc. on top of the MacOS
> filesystem?

The MacOS these days includes literally about 9,000 functions in its API.
There are many flavors of open, read, write, etc from which to choose!
The API headers include all the weird extensions though, so even building
the little Unix boot programs sucks you into supporting the extensions.

If you want to discuss the details further, they get pretty arcane, so I'd
suggest continuing in private email.

Stan

  reply	other threads:[~2000-09-12 19:44 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-12 18:43 Michael Sokolov
2000-09-12 19:44 ` Stan Shebs [this message]
2000-09-13  8:40 ` Joe Buck
  -- strict thread matches above, loose matches on Subject: below --
2000-09-13  8:49 Michael Sokolov
2000-09-12 18:18 Michael Sokolov
2000-09-12 18:08 Michael Sokolov
2000-09-12 17:57 Michael Sokolov
2000-09-12 18:12 ` Richard Henderson
2000-09-12 18:19 ` Geoff Keating
2000-09-12 19:05 ` Stan Shebs
2000-09-12  8:11 Richard Kenner
2000-09-09 12:33 Michael Sokolov
2000-09-11 20:47 ` Stan Shebs
2000-09-11 20:56   ` Michael Meissner
2000-09-11 21:33     ` Mark Mitchell
2000-09-12  0:02       ` lars brinkhoff
2000-09-12  0:15         ` Mark Mitchell
2000-09-12  3:26           ` lars brinkhoff
2000-09-12  7:23             ` Mark Mitchell
2000-09-12 11:16           ` Joe Buck
2000-09-12 11:22             ` Bernd Schmidt
2000-09-12 20:11               ` Mark Mitchell
2000-09-12 13:59             ` Stan Shebs
2000-09-12 17:55               ` Richard Henderson
2000-09-12 19:12                 ` Stan Shebs
2000-09-13  3:17                 ` Joseph S. Myers
2000-09-12 11:48           ` Toon Moene
2000-09-12  7:32         ` Jeffrey A Law
2000-09-12  0:03       ` lars brinkhoff
2000-09-12  9:52   ` David Huggins-Daines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39BEEA00.1B481229@apple.com \
    --to=shebs@apple.com \
    --cc=binutils@sources.redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=msokolov@ivan.Harhan.ORG \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).