WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 8 of 8] xen: add "clang=y" option to build Xen wi

To: Tim Deegan <Tim.Deegan@xxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 8 of 8] xen: add "clang=y" option to build Xen with clang/llvm instead of gcc
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Mon, 07 Mar 2011 17:01:58 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 07 Mar 2011 09:03:05 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:user-agent:date:subject:from:to:cc:message-id :thread-topic:thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=BdXn3MPXgB19e1KWxYLxQmYm2+sJCQQ4ZLt8QxWZM1k=; b=aZAvZ5TPKBKw4PznzGxNfyB/zivLaKkRVJ8P/+hvuzY1qQPXQF2qPrVVIv5BIY3ovY z4InQv5dSYnbSlcHPd7K+QGot+Mx6juvV7WJwEvTreIIa32shq1hc5l7M2pVZ+qZEVDz KTWxVXdNw8Nkb7UroToPDJsT4221Vx/EtfLHg=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=nROhIE8qJbqwGIkPti3mXfoz8voICuYv/NFGxSJPiBjmR0CbIzyEKyw+2KBhkaiV25 QmCpdZAbCuCBLXyRFrT+s0ILNbl6Aupi4lyYEvRBn33tlv2Q5H7Btb+v/GsP/59OK+n8 zAYubJOLefZ8SUnQj9JW5aCne2W3ICmboeF4Q=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110307162934.GD28479@xxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acvc6V5u1IyEQjvqnk2QIXKRuGObBA==
Thread-topic: [Xen-devel] [PATCH 8 of 8] xen: add "clang=y" option to build Xen with clang/llvm instead of gcc
User-agent: Microsoft-Entourage/12.28.0.101117
On 07/03/2011 16:29, "Tim Deegan" <Tim.Deegan@xxxxxxxxxx> wrote:

> At 14:54 +0000 on 07 Mar (1299509669), Ian Campbell wrote:
>> Is it worth arranging for "gcc := y" when clang is not enabled? Then a
>> whole bunch of this sort of thing devolves into the
>> CFLAGS-$(a-particular-cc) += -Wfoo
>> pattern.
> 
> Something like the attached?  It tidies up four such ifeqs, at the cost
> of one new one to define $(gcc).
> (4 files changed, 17 insertions(+), 16 deletions(-))

This looks like a definite improvement in readability, to me. I'd like it to
be applied.

 -- Keir

>>> @@ -1,6 +1,11 @@
>>>  AS         = $(CROSS_COMPILE)as
>>> +ifeq ($(clang),y)
>>> +LD         = $(CROSS_COMPILE)gold
>>> +CC         = $(CROSS_COMPILE)clang
>>> +else
>>>  LD         = $(CROSS_COMPILE)ld
>>>  CC         = $(CROSS_COMPILE)gcc
>>> +endif
>>>  CPP        = $(CC) -E
>>>  AR         = $(CROSS_COMPILE)ar
>>>  RANLIB     = $(CROSS_COMPILE)ranlib
>> 
>> LD-$(clang) = ...
>> LD-$(gcc)   = ...
>> 
>> LD := $(LD-y)
> 
> I tried that but it looks about as bad, and actually has more
> repetition. 
> 
> Tim.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>