On Wed, 2004-05-19 at 23:02, Marcus Furlong wrote:Hi,
I've seen conflicting information about what configure flags to use when cross-compiling for a lower x86 architecture on an x86.
Yes, because there exist different and partially inconsistent conventions and .. because many packages are not ready for cross-compilation.
I saw that there are certain conventions that are in place for a 'transitional' period. Would it not be wise to mark the old style conventions as deprecated, and force the package maintainers to adopt a consistent approach? (If they haven't been already! I can't find where I read this, but it was c2000 so this may already have taken place)
Normally you don't want to set --build.
With autoconf-2.5x generated configure scripts, to trigger cross-compilation (Which in autoconf terms means to apply a specialized cross-toolchain), you almost always will want to use configure --host=i486-pc-linux-gnu
However, many packages, esp. those using autoconf-2.13 use all kinds of "weird" custom conventions on processing "host/build/target", some even expect you to provide special settings on environment variables etc.
instead ofCf. above.
./configure --host=i486-pc-linux-gnu --target=i486-pc-linux-gnu
For complex packages which are prepared for Canadian Cross Compilation (gcc/binutils/gdb/glibc etc), this can be right.
In most cases, configure --target=i486-pc-linux-gnu will be what you probably want (This is what gcc, binutils, gdb, newlib expect. I am not familiar enough with glibc to comment on it).
The reason I posted here is because glibc seems to compile fine with --build, whereas with the "--host= --target=" combination
a) it gives a warning message like most of the other packages
configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used
b) it does not compile part of the locales because it thinks it is doing a true cross-compile.
So, --build solves these problems for glibc. I thought I'd check here before firing ahead and changing the configure arguments for all the other packages.
I had realised there was some inconsistency between the use of the three arguments (some packages rename the resultant binaries if host or target are set), but it seems that for time being the only way to find out which argument is best to use is by inspecting the configure script?
[You are building packages on an i686 (build), which shall contain binaries to run on an i686 (host), which shall generate code for i486s (target).]
and host and target will default to build if not set, this was part of my reasoning why setting --build= might be the best way to do it. Also I reasoned that because it's not true cross-compilation host and target shouldn't be set, and we should just lie about the underlying architecture.
From what you said above, I gather this is wrong, could you explain a bitmore? (It might save me a few days of recompilations!)
Thanks,
Marcus.
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail