how to cross compile?

Chris Murphy bugzilla at colorremedies.com
Thu Mar 31 20:56:00 PDT 2011



On Mar 30, 2011, at 8:26 AM, Rainer Müller wrote:

> On 03/25/2011 08:30 AM, Chris Murphy wrote:
>> I am on x86_64 Darwin 10.6. I need to compile smartmontools for PPC
>> Darwin 9.
>> 
>> If I change build_arch to ppc, the build fails presumably because I'm
>> on Snow Leopard which doesn't support ppc. But I don't see an option
>> in macports.conf to tell it to build for another platform.
>> 
>> Suggestions?
> 
> You could try to set macosx_deployment_target in macports.conf which
> will use the appropriate SDK if it does not match the current system.
> 
> But be aware that this is an unsupported option. Actually I never tried
> it myself.

I get this:

:info:configure checking whether we are cross compiling... configure: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_smartmontools/work/smartmontools-5.40':
:info:configure configure: error: cannot run C++ compiled programs.
:info:configure If you meant to cross compile, use `--host'.

So it seems like I need to track down the Portfile and set:

platform darwin powerpc {
	configure.args-append \
		--host=ppc-apple-rhapsody-10.5
}

But this is not exactly clear from the example and lack of an options list. I'm not seeing a Tcl file related to this package at all, so I have no idea how to proceed.


Chris Murphy



More information about the macports-users mailing list