Closed
Bug 613173
Opened 15 years ago
Closed 15 years ago
We incorrectly use $target instead of $host
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: paul.biggar, Unassigned)
Details
(Whiteboard: [fixed-in-tracemonkey])
Attachments
(1 file)
|
1.09 KB,
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
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.
Comment 1•15 years ago
|
||
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.
Comment 2•15 years ago
|
||
see bug 475488 comment 6.
| Reporter | ||
Comment 3•15 years ago
|
||
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)
Comment 4•15 years ago
|
||
I don't think a comment in configure is going to be all that useful, is it?
| Reporter | ||
Comment 5•15 years ago
|
||
(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 6•15 years ago
|
||
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+
| Reporter | ||
Comment 7•15 years ago
|
||
Whiteboard: [fixed-in-tracemonkey]
Comment 8•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•