[Buildroot] [PATCH v3] package/xen: Update to version 4.8.0
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Tue Apr 4 05:04:05 UTC 2017
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 at 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
More information about the buildroot
mailing list