[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 8 of 8] xen: add "clang=y" option to build Xen with clang/llvm instead of gcc



On Mon, 2011-03-07 at 16:29 +0000, Tim Deegan 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). 

I think that one is worth it to clean up all the others -- at least all
the nastiness will be contained to 1 place. Imagine a far distant future
where we also support e.g. icc or something...

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

Sure.

Ian.


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.