From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9202 invoked by alias); 15 Nov 2011 21:52:11 -0000 Received: (qmail 9193 invoked by uid 22791); 15 Nov 2011 21:52:09 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SARE_SUB_LEAD_CHAR2 X-Spam-Check-By: sourceware.org Received: from mail-yx0-f169.google.com (HELO mail-yx0-f169.google.com) (209.85.213.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 Nov 2011 21:51:56 +0000 Received: by yenm10 with SMTP id m10so5068183yen.0 for ; Tue, 15 Nov 2011 13:51:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.12.37 with SMTP id v5mr48796898pbb.90.1321393915333; Tue, 15 Nov 2011 13:51:55 -0800 (PST) Received: by 10.68.0.193 with HTTP; Tue, 15 Nov 2011 13:51:55 -0800 (PST) Date: Tue, 15 Nov 2011 21:52:00 -0000 Message-ID: Subject: --host versus --target From: Trevor Woerner To: crossgcc@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org X-SW-Source: 2011-11/txt/msg00059.txt.bz2 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= 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= 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