All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: xen-devel@lists.xenproject.org, keir@xen.org,
	ian.jackson@eu.citrix.com, tim@xen.org
Subject: Re: [PATCH for-4.7 1/5] build: make HOSTCC conditional on the value of clang
Date: Wed, 20 Apr 2016 15:51:04 +0100	[thread overview]
Message-ID: <20160420145017.hbf3tak4c4mbo4ga@MacBook-Air-de-Roger.local> (raw)
In-Reply-To: <5713FA2002000078000E6AAC@prv-mh.provo.novell.com>

On Sun, Apr 17, 2016 at 02:03:28PM -0600, Jan Beulich wrote:
> >>> Roger Pau Monne <roger.pau@citrix.com> 04/15/16 8:27 PM >>>
> >Previously HOSTCC was always hardcoded to gcc
> 
> So what is the goal here? Be able to build on a gcc-free system? Or else, how
> does it matter what compiler build elements get built with?

Exactly. Newish FreeBSD versions (>=10 IIRC) only have clang in the base 
system.
 
> >--- a/Config.mk
> >+++ b/Config.mk
> >@@ -36,7 +36,6 @@ CONFIG_$(XEN_OS) := y
>  >SHELL     ?= /bin/sh
>  >
>  ># Tools to run on system hosting the build
> >-HOSTCC      = gcc
>  >HOSTCFLAGS  = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
>  >HOSTCFLAGS += -fno-strict-aliasing
>  >
> >@@ -50,8 +49,10 @@ DESTDIR     ?= /
>  >clang ?= n
>  >ifeq ($(clang),n)
>  >gcc := y
> >+HOSTCC = gcc
>  >else
>  >gcc := n
> >+HOSTCC = clang
>  >endif
>  
>  In particular I wonder what this means for cross builds, where someone may
> have installed e.g. only a cross variant of clang.

Right, I think this should be ?= instead of =, so if a user has HOSTCC set 
in the build environment the build system doesn't overwrite it.
 
> That said, I'm not really opposed to the change (as it seems to be at least an
> incremental improvement), I only wonder whether some more thought (and
> change) is needed here.

IMHO, I think using ?= should at least be more correct, or if anyone has a 
better suggestion I'm happy to implement it.

Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-04-20 14:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-15 18:27 [PATCH for-4.7 0/5] build: fixes for building Xen with clang Roger Pau Monne
2016-04-15 18:27 ` [PATCH for-4.7 1/5] build: make HOSTCC conditional on the value of clang Roger Pau Monne
2016-04-17 20:03   ` Jan Beulich
2016-04-20 14:51     ` Roger Pau Monné [this message]
2016-04-20 17:09       ` Jan Beulich
2016-04-15 18:27 ` [PATCH for-4.7 2/5] build: set HOSTCXX based on clang value for Kconfig xconfig target Roger Pau Monne
2016-04-15 18:27 ` [PATCH for-4.7 3/5] build: pass HOST{CC/CXX} value down to Kconfig Roger Pau Monne
2016-04-22 16:26   ` Ian Jackson
2016-04-15 18:27 ` [PATCH for-4.7 4/5] build: remove Kconfig forced gcc selection Roger Pau Monne
2016-04-15 18:27 ` [PATCH for-4.7 5/5] travis: add an alias for gcc when using clang Roger Pau Monne
2016-04-17 10:02 ` [PATCH for-4.7 0/5] build: fixes for building Xen with clang Jan Beulich
2016-04-20 14:55   ` Roger Pau Monné

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160420145017.hbf3tak4c4mbo4ga@MacBook-Air-de-Roger.local \
    --to=roger.pau@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.