--host versus --target

Trevor Woerner twoerner@gmail.com
Tue Nov 15 21:52:00 GMT 2011


Hi,

In the crosstool-NG documentation is "5 - Using the toolchain.txt". In
there it recommends "using the target tuple to tell the build systems
to use your toolchain" and then gives an example of specifying the
'--target=tuple' option to 'configure'. Using crosstool-ng-1.13.1 I
recently built an arm-cortex_a8-linux-gnueabi toolchain. Looking
through the log file to see how, for example, strace was built for the
target I can't help notice --target was not used, only --host. I also
noticed that for all other tools --host is always specified.

I recently cross-compiled a system and never used --target, only
--host. Are there any definitive answers on how --target and --host
differ, or when they're needed (are they both needed, is only one
required)? I'm surprised my using --host seemed to have worked when
the documentation recommends --target.

I also was wondering about the --sysroot=<DIR> CFLAGS option. As I
successively compiled one package after another I kept installing them
to a staging area then copying them into one combined tree (with the
help of the populate script). Wouldn't it be necessary when
cross-compiling for a given target to keep specifying --sysroot=<DIR>
so the build machine's header files and libraries aren't accidentally
referenced during the build?

Best regards,
    Trevor

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list