views:

775

answers:

1

Hi, I'm running Mac OS X 10.5.8 and want to compile for target CentOS 5.3 with GCC 4.1.2. How could I:

  1. Compile GCC 4.1.2 toolchain and related tools?
  2. Use that tool to cross compile for target CentOS 5.3?

Any help is greatly appreciated!

+3  A: 

Your simplest solution is to just run CentOS 5.3 in a VM (e.g. Sun VirtualBox). This requires minimal setup, has quite reasonable overhead (assuming an Intel Mac), and you'll be able to actually test and debug what you are building.

If you really insist on cross-compiling, you must build a cross-compiler. Instructions are here and here, but beware: it will likely take you several days to get it right, and then you'll still need a VM to test the result, so I don't see any point in doing it that way.

Employed Russian
thanks for your reply. yes, your suggestion sounds good :D Спасибо!
Viet