]> git.proxmox.com Git - qemu.git/commitdiff
rules.mk: Fix build breakage
authorDunrong Huang <riegamaths@gmail.com>
Mon, 29 Apr 2013 14:52:12 +0000 (22:52 +0800)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 30 Apr 2013 14:52:14 +0000 (09:52 -0500)
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>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1367247132-19622-1-git-send-email-riegamaths@gmail.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
rules.mak

index 197a9d7abf65ca3a56a524f5d801e637ed982e4c..b21383beba39163cb927a0115d4262661fb4cfc1 100644 (file)
--- 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)$@")