Ryan Gordon and maybe others had the idea to create a gcc replacement
to allow on Mac OSX to run gcc one time with the necessary PPC settings
and the second time with the necessary X86 settings and then finally
combine these generated object files or other files with lipo.
Yesterday i hacked this gcc-fat version, it does some things different
than gcc-fat.sh, but basically works the same way. gcc-fat.sh created
ppc and x86 directorys for the files, which keeps the build directorys
clean, but needs a lot of hacking when you have something like this :
The two cases then would be
mv …/bin/test.exe …/bin/ppc/test.exe
mv …/bin/test.exe …/bin/x86/test.exe
Now my idea is to simply add _ppc for the ppc version
and _x86 for the x86 version. Also my version supports
more styles for example -c test1.cxx test2.cxx
and also -c test1.cxx test2.cxx -o test.
With my gcc-fat version i was able to compile Universal Binaries
from SDL-1.2 and FLTK-1.1 Other things should work too, but i had not
So how to use it now :
Unpack it into for example /tmp
Load main.cxx with an Editor and make changs to the SDK Settings.
( In the next version you will be able to dynamically select which
SDK to use for PPC and which SDK to use for X86 with environment
variables, the same way XCode does )
c++ GLB_basic.cxx main.cxx -o gcc-fat -DUSE_CC
c++ GLB_basic.cxx main.cxx -o g+±fat -DUSE_CXX
Now we have two replacements, one for gcc and one for g++.
Then type into your commandline :
Then you can build SDL and FLTK the normal way.
I know that my usage of String Pointer causes memory leaks.
But every modern OS frees the used memory after the app quits
and it is also no server daemon, so what the heck.
I tested this on a PPC Mac with latest Mac OSX 10.4.x with latest
Waiting for feedback