Cross Compile on MacOs

BlitzMax Forums/BlitzMax Programming/Cross Compile on MacOs

Koriolis(Posted 2008) [#1]
What is the current state of cross compiling for PPC and Intel?
XCode can do that, so there maybe a way to have BlitzMax do it too.
I have a PPC MacMini and I don't feel like buying yet another one for the sole purpose of compiling for Intel based Macs.

Has anyone managed to produce Intel-based Blitzmax binaries from a PPC based Mac?
Maybe through some BMK tweaks?


Brucey(Posted 2008) [#2]
Intel bcc creates x86 assembler... PPC bcc creates PPC assembler.

Alas Intel bcc won't run on a PPC OS X, unless you've got some kind of emulator.
However, it should, in theory, work the other way - that is, running a PPC BlitzMax install on an Intel Mac to create the PPC binaries.

But as it stands, no, you can't do what you'd like there.


Koriolis(Posted 2008) [#3]
Well that's a shame then. But I'm surprised if BCC itself is the real problem. The windows and linux versions already output intel asm, so I'm not quite sure what can prevent the MacOs Intel version to do the same - regardless of the platform it's running on.


Dreamora(Posted 2008) [#4]
MacOS actually.
You know the "we life in our own monopolistic controlled world, we aren't an open OS" thingy as always with Apple.

And that apple has no interest in you keeping your old trash forever as they earn a fair amount of money by selling hardware on its own, without even selling keyboard, gadgets and software.


Koriolis(Posted 2008) [#5]
Indeed I somewhat feel like Apple showed me his finger by turning my brand new mac mini into a pile of crap a few month after I bought it.
However there is one thing they did well : they DID make XCode cross compile for PPC and Intel, *even on the PPC version of XCode*.
I only wish Blitz Research to consider doing just the same.


Brucey(Posted 2008) [#6]
MacOS actually.

You know that's absolute nonsense :-p

BlitzMax isn't (currently?) designed to build for different architectures, other than the one a specific version of bcc is compiled for.


pls(Posted 2008) [#7]
Really, risking presenting this in a over simplistic manner (which is rather unfair to blr/mark) seems to me like using the cross compiler is just a matter of adding the "-arch ppc" and/or "-arch i386" to gcc calls and building the libs/exe, linking them and using the lipo tool to make the universal binaries afterwards.

This is really important for mac users, as it is the capability of choosing the sdk we want to use (i.e. the logical choise of defaults should be MacOSX10.3.9.sdk for the powerpc versions and MacOSX10.4u.sdk for intel... but it gets a bit more complex than that. MacOSX10.3.9.sdk does not come with xcode 3, so I believe it is better for brl to use acOSX10.4u.sdk as default for ppc and intel, making system requirements tiger / 10.4 version of OS X... with the option of letting us change that and install the older sdk to release panther apps... And MacOSX105.sdk makes sense if one is going to interface with 10.5 only frameworks and release a 10.5 app/game with exclusive stuff found on leopard). It all comes down to having a flag in bmk that would allow developers to choose the framework for each platform if building universal binaries or at the very least letting us produce the apps in two different/separate compiler runs (one for each architecture) and using lipo manually afterwards.

Anyway. Blitzmax is in my opinion the best high level option to write 2d games on a mac, followed closely by python+pyglet. I am not even considering things like unity / torque game builder since I _hate_ the interfaces (rather use a simple editor by far).

It would become a nice 3d system also if support was added to in a cross platform way to something like ogre (or some other good crossplatform engine) and all binaries where included in the distribution wrapped and working out of the box. Pretty much what happens with all the other libs blitzmax uses, wrapps and distributes. Even minib3d is nice, very usable as long as you don't need to animate meshes, but is lacking a lot of stuff that other options offer like shaders, etc. Right now I am having fun with python+ogre, which is a shame, because I really like Blitzmax (the "Flow" thing is not ready yet).

PLS