Re: What is different about the way Apple builds GCC ?
Re: What is different about the way Apple builds GCC ?
- Subject: Re: What is different about the way Apple builds GCC ?
- From: Sam Hart <email@hidden>
- Date: Mon, 26 Sep 2005 11:05:31 +0100
On 23 Sep 2005, at 23:43, Stan Shebs wrote:
I'm somewhat out of touch with the specifics of your issue (my first
inclination would be to double check system vs compiler versions, not
all combos work), but I thought I'd explain the theory; Apple GCC has
a special build process because we want to support multiple
architectures and fat^Wuniversal binaries. The "FSF way" only ever
builds one compiler, while the "Apple way" builds n-squared compilers
for n architectures, with appropriate hosts and targets, bootstrapping
the native versions, and lipo-ing together the target libraries. The
Apple way also takes care of some smaller issues, such as some
pathname
trickery.
After some digging around I think I have found some answers.
I hit on a few things quite by accident.
My patch will compile if I build the Apple way as root :
% mkdir -p build/obj build/dst build/sym
# gnumake install RC_OS=macos RC_ARCHS=ppc TARGETS=ppc \
SRCROOT=`pwd` OBJROOT=`pwd`/build/obj \
DSTROOT=`pwd`/build/dst SYMROOT=`pwd`/build/sym
# ditto build/dst /
when the build broke with :
ld: Undefined symbols:
___guard
___stack_smash_handler
it was a bit of a red herring, there was a problem with a file
permission previous to this.
Now the last section where I said that it builds the back-end
properly ( i.e. cc1 etc. )
well the reason for that is that you need a compiler of the same
version installed ( in this case 3.3 )
during Apple's build process it copies the front-end ( e.g. gcc-3.3 )
and a number of other files from the currently installed version.
So as you can see it's a bit of a chicken and egg situation.
My proposed solution is to build with an old version of 3.3 that I
can patch and build the fsf way ( because 1809 b0rks, )
then install it so that I can build a more recent patched version.
This opens up a new problem of how I am going to compile 3.5 and 4.0.
I feel that I should explain that my goal is to build Darwin with
protection added where possible, thus I have been working on compiler
patches, lib patches and kernel patches and these are at various
stages. I am also reworking libssp.
I am currently building so if anyone is interested I'll let you know
how it goes.
My thanks go to Shantonu Sen and Kevin Van Vechten for providing the
DarwinBuild environment.
S a m
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden