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: 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: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Mon, 7 Mar 2011 16:29:34 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 07 Mar 2011 08:31:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1299509669.17339.381.camel@xxxxxxxxxxxxxxxxxxxxxx>
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>
References: <patchbomb.1299497177@xxxxxxxxxxxxxxxxxxxxxxx> <d91e6a8d36ad3dbf89f4.1299497185@xxxxxxxxxxxxxxxxxxxxxxx> <1299509669.17339.381.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
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(-))

> > @@ -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.

-- 
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

Attachment: makeism
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>