multiple arch flags won't work with -E
Titus von Boxberg
titus at v9g.de
Fri Feb 4 01:10:04 PST 2011
Am 04.02.2011 um 04:18 schrieb Joshua Root:
> On 2011-2-4 14:07 , James Gregurich wrote:
>> ok. I will continue running tests on what I have to see what works and what doesn't work. I have the thing working for 3 different ports with no unreasonable modifications to the port files. There is no point to starting over with a new strategy if this one is working....particularly one that would mean much more complex port files.
>> The key is running the configure scripts through muniversal and setting the the -host option on the configure script. These projects appear to be designed to cross-compile you just have to pass the right options in. muniversal builds one architecture at a time...which is exactly what is needed for the configure scripts to work right on cross-compiling.
> You'll notice muniversal has an option called merger_must_run_binaries.
> Anything that needs this to be set will not cross compile.
The main question for me
would be if MacPorts is to be turned into something like iOSMacPorts.
My experience is limited to cross compiling for Linux.
From that perspective I would say that it is not a good idea to
try using the arch flags.
As far as I understood it (and an earlier post explained)
-arch is an apple specific extension
that works because the target system is identical for the
two processors (ppc and x86). That's why redefining few preprocessor
macros inside the compiler is sufficient for compiling for this
or that or both architectures.
I find it questionnable if this way will work for the overseeable future
for iOS, also when gcc eventually gets replaced by clang.
One problem with cross compiling that is expectable for some
packages is that autoconf configure scripts are failing
to detect cross compiling and to disable some automatic tests.
That's one of the main problems with incomplete
configure scripts even when cross compiling for Linux where
you have to specify build and host tuples.
No configure script I'm aware of is able to detect cross compiling
when simply being given C(XX)FLAGS=-archxx
What I'd recommend is that first the basics should be discussed and
not how to port a particular library.
My personal opinion is that MacPorts should not support cross compiling.
Sorry if I missed something in the thread.
More information about the macports-dev