From patchwork Wed Mar 27 18:45:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 161274 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp6829019jan; Wed, 27 Mar 2019 11:47:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqza0y7ylCNaVk0+JwUyzu2bNc73WcZTMGhRYW3qeH743pfKhLqYYhy4kdEDoxgWfFBEFT/d X-Received: by 2002:a5b:78f:: with SMTP id b15mr30841128ybq.366.1553712450274; Wed, 27 Mar 2019 11:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553712450; cv=none; d=google.com; s=arc-20160816; b=jKFoj+8r2IQZpU/niVsp2wyPmVH1I50yjZYnwhcjzlgEld1ZJMTYTE2JkGMHhBYMAM 8zbiTnDHl69EiK9o8fbOp/hqRcpknP5/NAe3AsvZFJQIb/reWkRdqHR2Ej/HXaqZZinz I4+EmH2ysCD6xV8GBSrRreAzE7ERq0SdmuIatuUindQy/BV3/Iw266asKM3tYhDoMbf0 B05dAM3nQgOetH2Pi8mwk7yczcEpJCWFedmGcLGNJ8oaCUe7iLcn4cHdLHqfUYlfVLMZ tNbGcTk+kWsK8v1tBs3j87kAtRcRT4caL/IUBgbpt3aveTL4Fx3rAuoDLzgFLSTnWGJi N9XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=2Zs8EIRhdJi72X5jBjqAeNbvd2h0Dh1mF1gKYW8hHrI=; b=I0mj8khcM8a0JdoUoew9F0ixzr/HCxNm3NYnN8KVjvXH61kFT6q+KLBPcaFLOmpl1p q9EaIrti+oIqf3I3pMPvyd1zKkSMIojRBGyKboBsv7xgj3MOQuriXN3+d242zuVIeFxw 5R52DhMjMci7vOHyroSdBO6lXaLA+FoS+cEPLvGmFMXVz7aMagBdaUsGnjiURyfTMuJ3 hLa7XgsqjQifbDNH6NDDSIeIIfV9LWxWiev9lcIf4DH9q72GHdcKa9PK7pPtxHVouhVx 2PGSpMeSyQG9j7NPWwusxy51ypRMIyc2p0JdSiHgUzoqasR87pTt9jxpzCIBVRADjTjX GUDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id z82si9492670ywz.210.2019.03.27.11.47.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2019 11:47:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1h9DYY-0001ha-Ht; Wed, 27 Mar 2019 18:45:46 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1h9DYX-0001hU-Dj for xen-devel@lists.xenproject.org; Wed, 27 Mar 2019 18:45:45 +0000 X-Inumbo-ID: 86eae7ac-50c0-11e9-bc90-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id 86eae7ac-50c0-11e9-bc90-bc764e045a96; Wed, 27 Mar 2019 18:45:43 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9D676A78; Wed, 27 Mar 2019 11:45:43 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 664323F557; Wed, 27 Mar 2019 11:45:41 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Wed, 27 Mar 2019 18:45:20 +0000 Message-Id: <20190327184531.30986-2-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190327184531.30986-1-julien.grall@arm.com> References: <20190327184531.30986-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH 01/12] xen: clang: Support correctly cross-compile X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Artem_Mygaiev@epam.com, sstabellini@kernel.org, Andrii_Anisov@epam.com, Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Oleksandr_Tyshchenko@epam.com, Julien Grall , Jan Beulich , Wei Liu MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Clang uses "-target" option for cross-compilation. Signed-off-by: Julien Grall --- config/StdGNU.mk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/config/StdGNU.mk b/config/StdGNU.mk index 039274ea61..48c50b5ad7 100644 --- a/config/StdGNU.mk +++ b/config/StdGNU.mk @@ -1,8 +1,13 @@ AS = $(CROSS_COMPILE)as LD = $(CROSS_COMPILE)ld ifeq ($(clang),y) -CC = $(CROSS_COMPILE)clang -CXX = $(CROSS_COMPILE)clang++ +ifneq ($(CROSS_COMPILE),) +CC = clang -target $(CROSS_COMPILE:-=) +CXX = clang++ -target $(CROSS_COMPILE:-=) +else +CC = clang +CXX = clang++ +endif LD_LTO = $(CROSS_COMPILE)llvm-ld else CC = $(CROSS_COMPILE)gcc