public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Trevor Woerner <twoerner@gmail.com>
To: crossgcc@sourceware.org
Subject: --host versus --target
Date: Tue, 15 Nov 2011 21:52:00 -0000	[thread overview]
Message-ID: <CAHUNapSMcbjMDmQEufcmCyhvJToHvHdhbj1EGws2n1hp5G2LuQ@mail.gmail.com> (raw)

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

             reply	other threads:[~2011-11-15 21:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15 21:52 Trevor Woerner [this message]
2011-11-15 22:45 ` Michael Hope
2011-11-15 22:49 ` Yann E. MORIN
2011-11-16 16:16   ` Trevor Woerner
2011-11-16 18:13     ` Yann E. MORIN
2011-11-16 20:18       ` Trevor Woerner
2011-11-16 22:43         ` Yann E. MORIN
2011-11-17 19:23     ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHUNapSMcbjMDmQEufcmCyhvJToHvHdhbj1EGws2n1hp5G2LuQ@mail.gmail.com \
    --to=twoerner@gmail.com \
    --cc=crossgcc@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).