This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: m68k MacOS target support?
- To: Michael Sokolov <msokolov at ivan dot Harhan dot ORG>
- Subject: Re: m68k MacOS target support?
- From: Stan Shebs <shebs at apple dot com>
- Date: Tue, 12 Sep 2000 19:05:44 -0700
- CC: gcc at gcc dot gnu dot org
- References: <0009130054.AA15094@ivan.Harhan.ORG>
Michael Sokolov wrote:
>
> Stan Shebs <shebs@apple.com> wrote:
>
> > I did three MacOS ports of GCC in all.
>
> OK, so if I understood you correctly, you've made two m68k MacOS-targeting
> compilers, one based on gcc-1.37 and the other on gcc-2.3.3, and both were only
> hosted on MPW (no cross-compilation to m68k MacOS from UNIX) using the MPW
> assembler and linker, right? You've never ported your own m68k MacOS assembler
> or linker, right?
That's right, I used Apple's compiler for stage 1 bootstrap.
> But what did you use for the C library? And what header files? Apple's own? Did
> you make gcc grok the awful syntax they use (pascal qualifier on declarations,
> the "= {word, word, ...}" thingy for inlining, etc), or did you patch them into
> a saner syntax?
The compiler was a total MPW compiler, used Apple headers and libraries,
and implemented every single one of those awful extensions. Did you know
that you could declare a global variable "pascal", with the sole effect of
translating the variable's name into all uppercase? That was easy, compared
to the per-function decision about the stack push order necessary to implement
pascal functions! To make it fit into the MPW environment perfectly, I wrote
a script that emulated the argument handling of the MPW C compiler.
> > All three of these versions used to be at Cygnus' ftp site, presumably
> > they're still there [...]
>
> OK, I've found your two m68k ports in ftp.cygnus.com:/pub/mac/m68k, but they
> are Mac self-extracting archives as far as I could tell. Could you please
> provide the sources in .tar.gz format? (After all, the GPL does require the
> source to be available in a machine-readable form. For a UNIX program I'd say
> this implies a UNIX-readable format. gcc is originally a UNIX program, and
> while a fork can be made for a different system, I think the original UNIX-
> based developers have a natural right to see the source in a UNIX-readable form
> for possible integration into the mainline.)
There are plenty of Mac unpacking programs available in source form for
Unix, but if I get a moment, I'll see if I can do a repack (seeing as how
I'm typing this on a beta OS X machine that has both Mac and Unix tools! :-) ).
> I don't have any Macs myself and I'm not a Mac user or programmer. In fact, I
> myself don't even have any personal instrest in Macs. I do, however, have a
> very strong interest in the mainline toolchain m68k port, and I want it to be
> able to target as many m68k systems as possible, especially when I can do it
> with very little effort (I mean extra effort beyond what I would need for other
> projects anyway) and when it's already done by forked versions, even if the
> target system is not a personal interest of my own.
That's cool with me if you really want to do the work, and I'll
happily pass along everything I know. There's hack value in having GCC
work for retro targets, a la arcade emulators, and we mustn't always
be so serious that we forget to be, paraphrasing RMS, "happy hackers".
Stan