Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3] package/xen: Update to version 4.8.0
Date: Tue, 4 Apr 2017 07:04:05 +0200	[thread overview]
Message-ID: <20170404070405.14db1e0f@free-electrons.com> (raw)
In-Reply-To: <CAKmqyKOAZFuJ2oEa-VZC0bUf9nV8-PKxz4z=4gHEok++a=Sh9A@mail.gmail.com>

Hello,

On Mon, 3 Apr 2017 14:59:53 -0700, Alistair Francis wrote:
> On Sat, Apr 1, 2017 at 5:56 AM, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
> > Hello,
> >
> > On Fri, 31 Mar 2017 11:11:14 -0700, Alistair Francis wrote:
> >  
> >> +-    $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(ARCH) SRCARCH=$(SRCARCH) HOSTCC="$(HOSTCC)" HOSTCXX="$(HOSTCXX)" $@
> >> ++    $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(ARCH) SRCARCH=$(SRCARCH) HOSTCC="$(HOSTCC)" HOSTCXX="$(HOSTCXX)" HOST_EXTRACFLAGS="$(APPEND_CFLAGS)" $@
> >> +
> >> + include/config/%.conf: include/config/auto.conf.cmd $(KCONFIG_CONFIG)
> >> +-    $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(ARCH) SRCARCH=$(SRCARCH) HOSTCC="$(HOSTCC)" HOSTCXX="$(HOSTCXX)" silentoldconfig
> >> ++    $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(ARCH) SRCARCH=$(SRCARCH) HOSTCC="$(HOSTCC)" HOSTCXX="$(HOSTCXX)" HOST_EXTRACFLAGS="$(APPEND_CFLAGS)" silentoldconfig
> >> +
> >> + # Allow people to just run `make` as before and not force them to configure
> >> + $(KCONFIG_CONFIG):
> >> +-    $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(ARCH) SRCARCH=$(SRCARCH) HOSTCC="$(HOSTCC)" HOSTCXX="$(HOSTCXX)" defconfig
> >> ++    $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(ARCH) SRCARCH=$(SRCARCH) HOSTCC="$(HOSTCC)" HOSTCXX="$(HOSTCXX)" HOST_EXTRACFLAGS="$(APPEND_CFLAGS)" defconfig  
> >
> > I'm sorry, but this looks completely wrong. HOSTCC and HOST_EXTRACFLAGS
> > refer to the host compiler and host compiler flags, and you're passing
> > flags for the target into them...  
> 
> I'm not changing anything related to HOSTCC flags, I'm leaving that as
> they always have been in Xen.

Of course you are changing things. You are changing:

HOSTCC="$(HOSTCC)" HOSTCXX="$(HOSTCXX)" defconfig

to:

HOSTCC="$(HOSTCC)" HOSTCXX="$(HOSTCXX)" HOST_EXTRACFLAGS="$(APPEND_CFLAGS)" defconfig  

So indeed, you're not changing HOSTCC or HOSTCXX, but you are passing
HOST_EXTRACFLAGS to the value APPEND_CFLAGS.

And HOST_EXTRACFLAGS as the name suggests seems to be flags for
building *host* programs (i.e built for the build machine). And you're
using that to pass through APPEND_CFLAGS *target* flags.

> All I'm doing is ensuring that the APPEND_CFLAGS argument is passed
> into all instances of make.

Yes, and that is wrong because APPEND_CFLAGS contains target flags.

> >> +# We need to change CFLAGS to APPEND_CFLAGS for the Xen build system to work
> >> +XEN_TARGET_CONFIGURE_OPTS := $(subst CFLAGS=",APPEND_CFLAGS="-Wno-error ,$(TARGET_CONFIGURE_OPTS))  

See here: you're changing TARGET_CONFIGURE_OPTS from:

	CFLAGS="$(TARGET_CFLAGS)"

to

	APPEND_CFLAGS="$(TARGET_CFLAGS)"

So APPEND_CFLAGS really contains target flags, and Xen will use them
when building host programs. This is not good.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2017-04-04  5:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 18:11 [Buildroot] [PATCH v3] package/xen: Update to version 4.8.0 Alistair Francis
2017-04-01 12:56 ` Thomas Petazzoni
2017-04-03 21:59   ` Alistair Francis
2017-04-04  5:04     ` Thomas Petazzoni [this message]
2017-04-11 21:49       ` Alistair Francis

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=20170404070405.14db1e0f@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox