Skip to contentSkip to conversation

rules.mk: Fix build breakage

PATCH Applied Dunrong Huang 3 participants 3 messages Apr 29, 2013 – Apr 30, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 rules.mk: Fix build breakage

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 <[email protected]>
Cc Blue Swirl <[email protected]>
Cc Paolo Bonzini <[email protected]>

---
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(-)
rules.mak +1 -1
index 292a422..2572070 100644
@@ -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)$@")
Signature · 1 line
1.8.1.5
Reviewed-by on v2 1/1
#1 lore raw

Il 29/04/2013 16:52, Dunrong Huang ha scritto:

Quoted 33 lines

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 <[email protected]>
Cc Blue Swirl <[email protected]>
Cc Paolo Bonzini <[email protected]>

---
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(-)
rules.mak +0 -0
index 292a422..2572070 100644

rules.mak MAKEFLAGS += -rR · line 21

Quoted 8 lines
rules.mak +1 -1
@@ -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)$@")