OS X PPC/Intel

BlitzMax Forums/BlitzMax Programming/OS X PPC/Intel

Tom Darby(Posted 2006) [#1]
Just to be clear...

In order to get a Universal Binary, I need to compile on an Intel Mac, correct?


René(Posted 2006) [#2]
As far as I know: not exactly. You have to create a PPC binary on a PPC Mac and Intel binary on an Intel Mac. After that you can combine both executables to an Universal Binary with the lipo tool that ships with Apples Xcoder developer pack. You can use it like this:

lipo -create <new_universal> <plat_specific_bin_1> <plat_specific_bin_2>


TartanTangerine (was Indiepath)(Posted 2006) [#3]
That's just crazy considering the PPC can compile x86 code.


Tom Darby(Posted 2006) [#4]
...thanks, all. I'm getting surprisingly few results in digging around the Internets on this one.

To rephrase my original question:

In order to create a PPC app in BlitzMax, is it true that I must compile on a PPC Mac?

In order to create an Intel app in BlitzMax, is it true that I must compile on an Intel Mac?

In order to produce a Universal Binary, is it true that I need to take the two compiled apps above and use Apple's lipo tool?


René(Posted 2006) [#5]
Yes, I think so.

Maybe you can ask the one who made "SuDo Ku". I think his nick is PLS. He delivers SuDo Ku as Universal Binary and has developed with BlitzMax.


pls(Posted 2006) [#6]
- Xcode can compile universal binaries on BOTH platforms. So a Xcode project can generate universal binaries from both PPC and Intel Macs.

- Blitzmax does not make use (yet) of the cross-compiler capabilities, so on Intel it generates Intel code, on PPC it generates PPC code.

- If you have both binaries compiled, by blitzmax, you can make use of the lipo tool to create a universal binary (you can use lipo on either ppc or Intel macs).

- You still need some sort of access to both a ppc and intel mac for testing purposes. On intel macs you can test the PPC version of a universal binary using "get info" and checking "run under Rosetta". But there is no equivalent to this on PowerPC macs (so if you must have a single mac, a Intel based one is better). As far as I can tell blitzmax powerpc binaries run well on intel under rosetta, only slower obviously (I cannot tell the difference on Su Doku Live, that's how good Rosetta is).

PLS


Tom Darby(Posted 2006) [#7]
Great--thanks for the info, pls!

Now all I need is an Intel Mac. Anybody willing to part with one? I'll send you cookies!


René(Posted 2006) [#8]
If you want, I can compile your code for Intel Macs. I'm running an Imac.


Tom Darby(Posted 2006) [#9]
Thanks--I'm pretty sure I can track down access to an Intel Mac, as my wife works in a research lab filled with various Macs. In any case, I'm still a ways away from a final version...


Punksmurf(Posted 2006) [#10]
- You still need some sort of access to both a ppc and intel mac for testing purposes. On intel macs you can test the PPC version of a universal binary using "get info" and checking "run under Rosetta". But there is no equivalent to this on PowerPC macs (so if you must have a single mac, a Intel based one is better). As far as I can tell blitzmax powerpc binaries run well on intel under rosetta, only slower obviously (I cannot tell the difference on Su Doku Live, that's how good Rosetta is).


Isn't it possible to run bMax on an Intel Mac using Rosetta and compiling a PPC-version?


pls(Posted 2006) [#11]
Punksmurf: not that I know about...


LeisureSuitLurie(Posted 2006) [#12]
@Punksmurf That would work in theory, wouldn't it?