All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Dunrong Huang <riegamaths@gmail.com>
Cc: Blue Swirl <blauwirbel@gmail.com>,
	Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH for-1.5 v2] rules.mk: Fix build breakage
Date: Mon, 29 Apr 2013 17:38:53 +0200	[thread overview]
Message-ID: <517E940D.2080704@redhat.com> (raw)
In-Reply-To: <1367247132-19622-1-git-send-email-riegamaths@gmail.com>

Il 29/04/2013 16:52, Dunrong Huang ha scritto:
> The following error occurs when building dtc module:
> 
>         CHK version_gen.h
>          CC libfdt/fdt.o
> cc1: error: dtc: No such file or directory [-Werror]
> cc1: all warnings being treated as errors
> make[1]: *** [libfdt/fdt.o] Error 1
> make: *** [subdir-dtc] Error 2
> 
> In rules.mak, "-I$(<D) -I$(@D)" was expanded to "-Idtc -I." when
> building submodule dct. Due to the using of "-Wmissing-include-dirs,
> a warning would be rarsed. To avoid it, add "-I$(<D) -I$(@D)" to
> QEMU_INCLUDES instead of QEMU_CFLAGS so that QEMU_CFLAGS does not
> contain the "-Idtc".
> 
> Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> Cc: Blue Swirl <blauwirbel@gmail.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
> ---
> v1 -> v2:
>    * Fix it by adding "-I$(<D) -I$(@D)" to QEMU_INCLUDES instead of
>      QEMU_CFLAGS(thanks to Paolo Bonzini for correction)
>    
>  rules.mak | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rules.mak b/rules.mak
> index 292a422..2572070 100644
> --- a/rules.mak
> +++ b/rules.mak
> @@ -15,7 +15,7 @@ MAKEFLAGS += -rR
>  QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d
>  
>  # Same as -I$(SRC_PATH) -I., but for the nested source/object directories
> -QEMU_CFLAGS += -I$(<D) -I$(@D)
> +QEMU_INCLUDES += -I$(<D) -I$(@D)
>  
>  %.o: %.c
>  	$(call quiet-command,$(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<,"  CC    $(TARGET_DIR)$@")
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

  reply	other threads:[~2013-04-29 15:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-29 14:52 [Qemu-devel] [PATCH for-1.5 v2] rules.mk: Fix build breakage Dunrong Huang
2013-04-29 15:38 ` Paolo Bonzini [this message]
2013-04-30 18:58 ` Anthony Liguori

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=517E940D.2080704@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    --cc=riegamaths@gmail.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.