Ralf S. Engelschall wrote:
However, this still did not work because OpenPKG will fail to locate
the real compiler e.g. i686-apple-darwin8-gcc-4.0.1 (from /usr/bin),
but only find the "gcc-4.0" driver front-end... (symlinked from cc)
So either I need to bring some more symlinks in, or do it
differently ?
This I do not understand: what _IS_ /usr/bin/gcc under MacOS? Is is
a strange wrapper script which is unable to find its backends when
called via a symlink? Ok, let's try a different approach: in the latest
"openpkg-import" I've now replaced the symlinks with wrapper scripts
which directly _exec_ the /usr/bin/gcc. Perhaps this works better.
It's a strange wrapper alright, although a program not a script.
If we start from the beginning: /usr/bin/cc and /usr/bin/gcc
are just symlinks to the currently selected GCC compiler, as
chosen by "gcc_select" and as default for the Mac OS X version.
e.g.
/usr/bin/cc -> gcc-4.0
/usr/bin/gcc -> gcc-4.0
Anyway, for Mac OS X 10.1 - 10.3 is pretty straight forward -
it's one of the binaries "gcc2" or "gcc3" (3.1) or "gcc-3.3".
However, for Mac OS X 10.4 things get more complicated since
it can build Universal Binaries for the two architectures...
So "gcc-4.0" will call upon either "i686-apple-darwin8-gcc-4.0.1"
or "powerpc-apple-darwin-gcc-4.0.1", to compile for either arch.
If you use universal flags like "-arch ppc -arch i386" it will do
one compile for ppc and one compile for i386, and lipo(1) together.
This front-end compiler driver is part of the Apple GCC compiler.
(see gcc/config/darwin-driver.c in the gcc-5363 Darwin sources)
Each architecture is multi-lib, so there are four potential arch
targets: ppc, i386, ppc64 and x86_64 - all in the same binary...
HTH (will try the exec)
--anders
PS. The default is of course to compile for the local -arch only.
______________________________________________________________________
OpenPKG http://openpkg.org
Developer Communication List openpkg-dev@openpkg.org