[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What is up with gcc on MacOS ?
From: |
W . Northcott |
Subject: |
Re: What is up with gcc on MacOS ? |
Date: |
Fri, 13 Sep 2002 11:44:01 +1000 |
> I think here you refer to the version of gcc-3.1 that is distributed
> with the MacOS X operating system v.10.2, right? One would not want to
> use the gcc that was packaged with v10.1, since that was gcc2.
First the history:
You will remember a few years back that the then gcc maintainers became
rather uncooperative leading the creation of egcs and the eventual take
over by that version of the mainline code.
During this time Next was doing a lot of development on gcc2 almost all of
which was rejected by the gcc maintainers. Consequently, the Next and
later Apple version of gcc2 became very different to the FSF version.
There is no way it would compile any recent version of Swarm.
For the last year and a half or more, Apple has been working hard to
reconverge their gcc and the FSF version.
The original target for the convergence was gcc3.1. However, Apple
decided to make gcc3.1 the system compiler for MacOS X 10.2, and allocated
a substantial number of engineers to work on the code. This team has been
producing modifications much faster than the FSF could accept them
particularly in the last few months with the deadline on 10.2. According
to Stan Shebs, a fairly public member of the Apple compiler team and an
FSF maintainer, the target for convergence is now 3.4 or 3.5, and they do
not expect to ship 3.2.
We now have an Apple version of gcc3.1 which is again significantly
different from the FSF src. These differences start with the build
process which is based on script 'build_gcc' rather than the traditional
autoconf/automake. The Apple compiler has a lot of PPC optimisatons
lacking in the FSF version. The FSF 3.1 produces much slower code than
2.95.2, whereas the Apple version produces significantly faster code, and
takes less time to compile if you can use their pre-compiler.
Apple are still working hard fixing bugs. There has already been one
patch update for the Jaguar development tools.
> I read in the MacOSX 10.2 release info that one can rebuild their gcc.
This is a fairly painless process. I had documented on this list the
steps needed to build the 3.1 compiler on MacOS X 10.1 from the cvs
sources. This should be much easier with 10.2 which will not need the
updates to tools like ld as etc..
OS X includes cvs and the supplied IDE 'Project Builder' (PB) also
supports it. The Apple gcc3 code contains a PB project that can be used
to manage the file although it will not build yet. If they get that
working, building the compiler will be trivial.
> If you go here:
> http://www.opensource.apple.com/projects/darwin/1.4/projects.html
> you see "Darwin" related open source projects, and there you find a link
> to this source code:
>
http://www.opensource.apple.com/projects/darwin/1.4/source/other/gcc-932.1-6.tar.gz
I would not bother with snapshots. It is easier to get the code direct
from the cvs using tags.
> It is not clear to me what the version number means, and I wonder if it
> is the same as 3.1 that they distribute with v10.2 or if it is an
> updated snapshot.
If you go to the WebCVS on www.opensource.apple.com (needs a free login to
be created) you can browse into the gcc3 project tree and use the
scrolling menu at the bottom of the page to see the tags. The delopment
tags are like gcc3-1XXX. When I looked just now , the latest seemed to be
gcc3-1203. I believe the Jaguar compiler is gcc3-1160 or thereabouts.
Every couple of months they import the current FSF sources into the Apple
tree. This obviously breaks a lot of things and they avoided doing it for
some months before the 10.2 launch. I think it was done again about 10
days ago.
The current compiler on this (10.1) machine reports thus:
cc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs
Thread model: posix
Apple Computer, Inc. GCC version 1150, based on gcc version 3.1 20020420
(prerelease)
This means it was built from the cvs tag gcc3-1150 which is itself based
on code imported from FSF on 20 April.
> IT is true, from what I read, that the apple-extended version of gcc
> will never be exactly the same as the original gcc. But much of the
> Objective-C work did get patched into the FSF version of gcc 3.2. The
> Apple folk are the ones doing much of the Obj-C work on the current gcc
> snapshots. I believe the snaps of gcc reflect the Apple magic. The
> release notes for these gcc-3.2 snaps indicate that messaging in Obj-C
> is accelerated by 2 or 3 times. Stan Shebs <shebs at apple dot com>
> posted a note indicating that gcc-3.2 includes most general compiler
> optimizations from Apple.
Stan is the word on this stuff. As he says, it is likely that the Apple
build of the compiler will never be identical to the FSF one. This would
be similar to XFree86 which has one source tree for Darwin and other
versions, but the Darwin build is different.
> So, are you really certain that the newest gcc-3.2 is an "unsupported"
> compiler from the Mac point of view?
It is the FSF build of the Apple source that would be unsupported. This
is not the same as the Apple build from the same source. The file layout
is quite different and AFAIK it won't work with PB. I can see no point in
using it.
I finally got a copy of OS 10.2. So over the weekend I might get it
installed on my home machine.
Bill Northcott
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: What is up with gcc on MacOS ?,
W . Northcott <=