This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
First, we have the following three configure flags:
--build= sets the machine on which the compiler is being built. Assumed to be host, unless otherwise specified.
--host= sets the machine on which the compiler is supposed to run.
--target= sets the machine which the compiler is supposed to generate code for.
Exactly. And then there's the hidden boolean setting is_cross_compile, which, if false, tells the build system to pull in stuff from /usr and /lib on the assumption that it will work. Normally is_cross_compile is set to false if host==target. However, in the case of building a toolchain incompatible with the stuff laying around in /usr and /lib, you need to be able to force is_cross_compile to true.
A few thoughts:
I don't think --host shouldn't matter much in the case of the compiler. Essentially, all it means is that the hosted environment has xyz feature that the compiler can rely on. Thanks to autoconf, most thinks are tested based on specific features, and not set generically per platform.
For instance, I did a compile of gcc 2.95 for i386-linux on powerpc-darwin, but told it that the host was for m68k-linux. The resulting compiler seems to work fine.
There are certain scenarios where this difference is important, ie a 32 bit host and 64 bit target. There, I imagine setting host == target may have some serious issues...
If --host matters sometimes, then I think it's valid for autoconf or whoever to use the presence or value of --host to decide whether to set is_cross_compile.
If setting --target= for x86 x x86 cross compiles fails, that is a bug, and I'd file it as such. Admittedly it's not the common case, but setting --host shouldn't be necessary.
Setting --target works fine, but the resulting compile fails because gcc is built as a native compiler rather than a cross compiler. There must be a way to force gcc's configure to not pull in local libraries and include files. --host being different from --target is my current workaround to force this. I will be happy with anything that works, though. - Dan
-- Dan Kegel http://www.kegel.com http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045
------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |