- --host: In which system the generated program will run.
- --build: In which system the program will be built.
- --target: this option is only used to build a cross-compiling toolchain. When the tool chain generates executable program, in which target system the program will run.
'./configure --host=arm-linux --build=i686-pc-linux-gnu': the dynamically library is built on a x86 linux computer but will be used for a embedded arm linux system.
An example of gcc:
'./configure --target=i686-pc-linux-gnu --host=arm-linux --build=i686-pc-linux-gnu':- A gcc compiler is build on x86 linux computer. [--build]
- The gcc will be executed on an embedded arm linux system.[--host]
- But the gcc will generate the binary program, which run in a x86 linux system. [--target]
Reference:
http://matrix.wearlab.de/en/wiki/index.php?title=ArmCrossCompiler&redirect=no
i can not understand the target is the binary for the arm or x86
ReplyDeleteIf I want to get a gcc, for example run "./configure --build=powerpc --host=i686 --target=mips ", Is the output executable crippled? usually, gcc is a powerful tool that can build c code, then output many kind of result for many platform. Here if I use '--target=mips', does the specified gcc lost the ability? the gcc can only output mips flavor executable?
ReplyDeleteThanks for the explanation. This is very helpful for cross-compiling of libraries/tools into other architectures.
ReplyDeleteI was surfing net and fortunately came across this site and found very interesting stuff here. Its really fun to read. I enjoyed a lot. Thanks for sharing this wonderful information.Target Laptop
ReplyDelete