All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: C Fontana <claudio.fontana@linaro.org>,
	"xen-devel@lists.xensource.com Devel"
	<xen-devel@lists.xensource.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [Qemu-devel] [PATCH] prepend the include path of libvixl header files
Date: Tue, 8 Jul 2014 12:21:57 +0100	[thread overview]
Message-ID: <CAFEAcA9F5tvK2C3S0O2cQ4BTnBiG225dW+eEDt_KNQWsPUogdg@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1407071618410.27641@kaball.uk.xensource.com>

On 7 July 2014 16:25, Stefano Stabellini
<stefano.stabellini@eu.citrix.com> wrote:
> Currently the Makefile of disas/libvixl appends
> -I$(SRC_PATH)/disas/libvixl to QEMU_CFLAGS. As a consequence C++ files
> that #include "utils.h", such as disas/libvixl/a64/instructions-a64.cc,
> are going to look for utils.h on all the other include paths first.
>
> When building QEMU as part of the Xen make system, another unrelated
> utils.h file is going to be chosen for inclusion, causing a build
> failure:
>
> In file included from disas/libvixl/a64/instructions-a64.cc:27:0:
> /qemu/disas/libvixl/a64/instructions-a64.h:88:64: error:
> ‘rawbits_to_float’ was not declared in this scope
>  const float kFP32PositiveInfinity = rawbits_to_float(0x7f800000);
>
> Fix the problem by prepending (rather than appending) the libvixl
> include path to QEMU_CFLAGS.
>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>
> ---
>
> diff --git a/disas/libvixl/Makefile.objs b/disas/libvixl/Makefile.objs
> index 0adb3ce..17e6565 100644
> --- a/disas/libvixl/Makefile.objs
> +++ b/disas/libvixl/Makefile.objs
> @@ -3,6 +3,6 @@ libvixl_OBJS = utils.o \
>                 a64/decoder-a64.o \
>                 a64/disasm-a64.o
>
> -$(addprefix $(obj)/,$(libvixl_OBJS)): QEMU_CFLAGS += -I$(SRC_PATH)/disas/libvixl
> +$(addprefix $(obj)/,$(libvixl_OBJS)): QEMU_CFLAGS := -I$(SRC_PATH)/disas/libvixl $(QEMU_CFLAGS)
>
>  common-obj-$(CONFIG_ARM_A64_DIS) += $(libvixl_OBJS)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

I spent a few moments wondering if the conversion of
QEMU_CFLAGS from recursively-expanded to simply-expanded
would be a problem, but because this is a target-specific
variable it's pretty much going to be expanded at the same
point that it would be anyhow.

thanks
-- PMM

WARNING: multiple messages have this Message-ID (diff)
From: Peter Maydell <peter.maydell@linaro.org>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: C Fontana <claudio.fontana@linaro.org>,
	"xen-devel@lists.xensource.com Devel"
	<xen-devel@lists.xensource.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [PATCH] prepend the include path of libvixl header files
Date: Tue, 8 Jul 2014 12:21:57 +0100	[thread overview]
Message-ID: <CAFEAcA9F5tvK2C3S0O2cQ4BTnBiG225dW+eEDt_KNQWsPUogdg@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1407071618410.27641@kaball.uk.xensource.com>

On 7 July 2014 16:25, Stefano Stabellini
<stefano.stabellini@eu.citrix.com> wrote:
> Currently the Makefile of disas/libvixl appends
> -I$(SRC_PATH)/disas/libvixl to QEMU_CFLAGS. As a consequence C++ files
> that #include "utils.h", such as disas/libvixl/a64/instructions-a64.cc,
> are going to look for utils.h on all the other include paths first.
>
> When building QEMU as part of the Xen make system, another unrelated
> utils.h file is going to be chosen for inclusion, causing a build
> failure:
>
> In file included from disas/libvixl/a64/instructions-a64.cc:27:0:
> /qemu/disas/libvixl/a64/instructions-a64.h:88:64: error:
> ‘rawbits_to_float’ was not declared in this scope
>  const float kFP32PositiveInfinity = rawbits_to_float(0x7f800000);
>
> Fix the problem by prepending (rather than appending) the libvixl
> include path to QEMU_CFLAGS.
>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>
> ---
>
> diff --git a/disas/libvixl/Makefile.objs b/disas/libvixl/Makefile.objs
> index 0adb3ce..17e6565 100644
> --- a/disas/libvixl/Makefile.objs
> +++ b/disas/libvixl/Makefile.objs
> @@ -3,6 +3,6 @@ libvixl_OBJS = utils.o \
>                 a64/decoder-a64.o \
>                 a64/disasm-a64.o
>
> -$(addprefix $(obj)/,$(libvixl_OBJS)): QEMU_CFLAGS += -I$(SRC_PATH)/disas/libvixl
> +$(addprefix $(obj)/,$(libvixl_OBJS)): QEMU_CFLAGS := -I$(SRC_PATH)/disas/libvixl $(QEMU_CFLAGS)
>
>  common-obj-$(CONFIG_ARM_A64_DIS) += $(libvixl_OBJS)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

I spent a few moments wondering if the conversion of
QEMU_CFLAGS from recursively-expanded to simply-expanded
would be a problem, but because this is a target-specific
variable it's pretty much going to be expanded at the same
point that it would be anyhow.

thanks
-- PMM

  reply	other threads:[~2014-07-08 11:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-07 15:25 [Qemu-devel] [PATCH] prepend the include path of libvixl header files Stefano Stabellini
2014-07-07 15:25 ` Stefano Stabellini
2014-07-08 11:21 ` Peter Maydell [this message]
2014-07-08 11:21   ` Peter Maydell
2014-07-08 11:55   ` [Qemu-devel] " Stefano Stabellini
2014-07-08 11:55     ` Stefano Stabellini
2014-07-08 11:57     ` [Qemu-devel] " Peter Maydell
2014-07-08 11:57       ` Peter Maydell
2014-07-08 11:59       ` [Qemu-devel] " Stefano Stabellini
2014-07-08 11:59         ` Stefano Stabellini
2014-07-09 20:16         ` [Qemu-devel] " Stefano Stabellini
2014-07-09 20:16           ` Stefano Stabellini

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=CAFEAcA9F5tvK2C3S0O2cQ4BTnBiG225dW+eEDt_KNQWsPUogdg@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=claudio.fontana@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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.