how to cross compile?
ryandesign at macports.org
Fri Apr 1 03:19:24 PDT 2011
On Apr 1, 2011, at 04:45, Dominik Reichardt wrote:
> I don't quite follow anyway. What do you want to compile for which target?
> If you want to compile for ppc and are on intel (or other way round) you need all the needed stuff in the target arch as well. When you are on Snow Leopard and you want ppc, I don't think this works easily with macports anymore.
He's on an Intel Snow Leopard machine, and wants to compile smartmontools for a PowerPC Leopard machine. This should be possible (the universal Leopard SDK is certainly part of Snow Leopard's Xcode), but is not something MacPorts was designed to do and is not tested so it might not actually work properly.
> But there are other steps you can take, for example build all necessary things WITHOUT macports in another prefix with the desired arch. And then when you compile the software you have to make sure that you apply some magic to build it static.
> Because doing it the macports way would mean you'd need to build it static anyway (or need to install macports+xcode on the target).
Nothing installed by MacPorts links with any part of MacPorts itself, so certainly installing MacPorts itself on the target would not be necessary. And Xcode is only needed to compile the software; once it's compiled, that's no longer needed.
> Pure xcode 3.x without ios support is < 1GB, btw. And that is for Snow Leopard only anyway.
> For former OSX the xcode download is even smaller.
I was unable to find a standalone (iOS-less) Xcode 3.2.6 installer; is there one? I know there was for earlier 3.2.x releases.
Chris, give me a minute and I can boot up my PowerPC Leopard machine and make you a binary installer package of smartmontools.
More information about the macports-users