From patchwork Tue Mar 25 16:55:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 27054 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 560AC20539 for ; Tue, 25 Mar 2014 16:57:36 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id c41sf1839552yho.9 for ; Tue, 25 Mar 2014 09:57:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :list-archive:content-type:content-transfer-encoding; bh=U3KJo/NVfLzPBtsywLzVQsVCKT/qeBAWO5KDafhxmEk=; b=hrhKcG0rO3Lvz/C8bpFasr2kCn9prrCdyBWi4Ee6HwE+AIhQZVj1nsgcxjcoU2FtXf /o2VI5RhRN3oGhmZGOhdd9V+q+hqS+A513eDZbyRZwDCH8EmKcSvBAwDK7AZZOJTjYd7 23tM6YVALSx0IrqrmeyT/WyD1drQtXssHk9MOcXyWnX/18cWhhKjdPPq0Zl68Xw5Zmtb c2HhD2JPub9YZXwd2yRHGvBVQ9B+0F9w1PKwzkkH+neiA0rFCtWpPbM2ORdAwB/9H0Ju ZwI+k4xeV38Yv73+1k+wDibZaRaMpVVU2rZ9wR4+QJdRcLk4fk+rlDTcngdvGFZJfhtD k92w== X-Gm-Message-State: ALoCoQk9fHiia9hLmM+C2x6XrR7vlbYHbyNtBeoKskwROsYxftvMoQ4NgBJw1ifI/STddv9RxQgK X-Received: by 10.58.41.39 with SMTP id c7mr19429879vel.25.1395766656024; Tue, 25 Mar 2014 09:57:36 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.20.138 with SMTP id 10ls289267qgj.92.gmail; Tue, 25 Mar 2014 09:57:35 -0700 (PDT) X-Received: by 10.220.92.135 with SMTP id r7mr56264150vcm.11.1395766655957; Tue, 25 Mar 2014 09:57:35 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id vr5si3867430vec.39.2014.03.25.09.57.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Mar 2014 09:57:35 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id la4so920675vcb.31 for ; Tue, 25 Mar 2014 09:57:35 -0700 (PDT) X-Received: by 10.52.137.74 with SMTP id qg10mr51799vdb.61.1395766655847; Tue, 25 Mar 2014 09:57:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp320329vck; Tue, 25 Mar 2014 09:57:35 -0700 (PDT) X-Received: by 10.58.190.99 with SMTP id gp3mr896709vec.32.1395766655437; Tue, 25 Mar 2014 09:57:35 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id cb3si3957754vdc.77.2014.03.25.09.57.34 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 25 Mar 2014 09:57:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WSUdl-0008Ao-TS; Tue, 25 Mar 2014 16:55:53 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WSUdk-0008AP-Ld for xen-devel@lists.xenproject.org; Tue, 25 Mar 2014 16:55:52 +0000 Received: from [85.158.143.35:60379] by server-2.bemta-4.messagelabs.com id 05/F5-06539-815B1335; Tue, 25 Mar 2014 16:55:52 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-16.tower-21.messagelabs.com!1395766551!4581860!1 X-Originating-IP: [74.125.83.49] X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50 X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 20166 invoked from network); 25 Mar 2014 16:55:51 -0000 Received: from mail-ee0-f49.google.com (HELO mail-ee0-f49.google.com) (74.125.83.49) by server-16.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 25 Mar 2014 16:55:51 -0000 Received: by mail-ee0-f49.google.com with SMTP id c41so686539eek.8 for ; Tue, 25 Mar 2014 09:55:51 -0700 (PDT) X-Received: by 10.15.67.142 with SMTP id u14mr31945712eex.19.1395766551182; Tue, 25 Mar 2014 09:55:51 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id h47sm33377501eey.13.2014.03.25.09.55.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Mar 2014 09:55:48 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 25 Mar 2014 16:55:10 +0000 Message-Id: <1395766541-23979-4-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> References: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> Cc: stefano.stabellini@citrix.com, Keir Fraser , Julien Grall , tim@xen.org, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH 03/34] xen: clang: Support correctly cross-compile X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: Clang uses "-target" option for cross-compilation. Signed-off-by: Julien Grall Cc: Keir Fraser --- config/StdGNU.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/StdGNU.mk b/config/StdGNU.mk index 25fc594..496e1d9 100644 --- a/config/StdGNU.mk +++ b/config/StdGNU.mk @@ -1,7 +1,11 @@ AS = $(CROSS_COMPILE)as LD = $(CROSS_COMPILE)ld ifeq ($(clang),y) -CC = $(CROSS_COMPILE)clang +ifneq ($(CROSS_COMPILE),) +CC = clang -target $(CROSS_COMPILE:-=) +else +CC = clang +endif LD_LTO = $(CROSS_COMPILE)llvm-ld else CC = $(CROSS_COMPILE)gcc