From my reading of the autotools book [http://sources.redhat.com/autobook/autobook/autobook_258.html] (which I imagine is stull current because we use autoconf 2.13), we should be cross-compiling using $host, not $target. $target is for tools that generate code, like a compiler, which Mozilla is not. $host is for the system that the compiled binary will run on, which is what we want. So for example, in configure.in, we check $host != $target, which should always be false if we used the tools correctly. Instead, we set |./configure --target|, and luck out that it works out OK. By contrast, when configuring js/src/libffi (from js/src/configure.in) we set $build and $host (ie we do it correctly). It seems this hasn't caused us trouble, but I'm not positive why since it shares the config.cache with higher-level build steps.
We misuse $host to mean $build and $target to mean $host. But we've done this for so long that changing it now would be pretty confusing to people. We've talked about adding a set of shims so that when people set --target=foo they actually mean --host=foo and changing the HOST_*FLAGS to be BUILD_*FLAGS, but the risk is high and the win is fairly low. We should probably refactor the configure script first, at least.
see bug 475488 comment 6.
Created attachment 491591 [details] [diff] [review] Comment describing the $host/$target weirdness OK, how do we feel about this patch? (I'll backport it to configure.in fomr js/src/configure.in if the tree ever opens again).
Attachment #491591 - Flags: review?(ted.mielczarek)
I don't think a comment in configure is going to be all that useful, is it?
(In reply to comment #4) > I don't think a comment in configure is going to be all that useful, is it? Better than no comment about this. Unless you mean that it should go in the |configure --help| output?
Comment on attachment 491591 [details] [diff] [review] Comment describing the $host/$target weirdness It's harmless, so I don't oppose it, I just don't think anyone is going to read our configure.in to find it if they actually hit this confusion.
Attachment #491591 - Flags: review?(ted.mielczarek) → review+
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.