Makefile: Fix build breakage
PATCH 1/1 Makefile: 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, use dtc as the first prerequisite so that "$(^D)" was expanded to "."
--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
@@ -148,7 +148,7 @@ $(SRC_PATH)/pixman/configure: DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_srcdir=$(SRC_PATH)/dtc/libfdt DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS) -I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt -subdir-dtc:dtc/libfdt dtc/tests +subdir-dtc:dtc dtc/libfdt dtc/tests $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,) dtc/%:
Signature · 1 line
1.8.1.5
Il 28/04/2013 20:04, Dunrong Huang ha scritto:
Quoted 27 lines
The following error occurs when building dtc module:
CHK
version_gen.h
CClibfdt/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 2In 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, use dtc as the first prerequisite so that "$(^D)" was expanded to "."
Cc Peter Crosthwaite <[email protected]>Cc Blue Swirl <[email protected]>Signed-off-by Dunrong Huang <[email protected]>--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Makefile +0
-0
Makefile $(SRC_PATH)/pixman/configure: · line 154
Quoted 8 lines
Makefile +1
-1@@ -148,7 +148,7 @@ $(SRC_PATH)/pixman/configure: DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_srcdir=$(SRC_PATH)/dtc/libfdt DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS) -I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt -subdir-dtc:dtc/libfdt dtc/tests +subdir-dtc:dtc dtc/libfdt dtc/tests $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,) dtc/%:
Does it work if the "-I$(<D) -I$(@D)" is added to QEMU_INCLUDES instead of QEMU_CFLAGS?
Paolo
Quoted 38 lines · Paolo Bonzini
Il 28/04/2013 20:04, Dunrong Huang ha scritto:
Quoted 26 lines
The following error occurs when building dtc module:
CHK
version_gen.h
CClibfdt/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 2In 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, use dtc as the first prerequisite so that "$(^D)" was expanded to "."
Cc Peter Crosthwaite <[email protected]>Cc Blue Swirl <[email protected]>Signed-off-by Dunrong Huang <[email protected]>--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Makefile +0
-0Makefile $(SRC_PATH)/pixman/configure: · line 148
Quoted 1 line
Makefile +0
-0@@ -148,7 +148,7 @@ $(SRC_PATH)/pixman/configure: DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)"LIBFDT_srcdir=$(SRC_PATH)/dtc/libfdt
Makefile $(SRC_PATH)/pixman/configure: · line 149
Quoted 1 line
Makefile +0
-0DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS) -I$(BUILD_DIR)/dtc-I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt
Makefile $(SRC_PATH)/pixman/configure: · line 151
Quoted 4 lines
Makefile +1
-1-subdir-dtc:dtc/libfdt dtc/tests +subdir-dtc:dtc dtc/libfdt dtc/tests $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS)CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,)
Quoted 1 line
Quoted 6 lines
Quoted 2 lines
dtc/%:
Does it work if the "-I$(<D) -I$(@D)" is added to
QEMU_INCLUDESinstead ofQEMU_CFLAGS?
Yes, this way works for me.
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)
but I don't know if it will break other build, e.g. mingw build.
Quoted 3 lines
Paolo
Signature · 3 lines
Best Regards, Dunrong Huang
Il 29/04/2013 15:33, Dunrong Huang ha scritto:
Quoted 14 lines
Yes, this way works for me.
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)
Quoted 1 line
but I don't know if it will break other build, e.g. mingw build.
Please submit it, it is a better fix. Make sure you put "1.5" in the subject.
Paolo
Hi Dunrong, Paolo,
Managed to replicate using Ubuntu 12.04,
Quoted 57 lines · Dunrong Huang
Quoted 40 lines · Paolo Bonzini
Il 28/04/2013 20:04, Dunrong Huang ha scritto:
Quoted 38 lines
The following error occurs when building dtc module:
CHK
version_gen.h
CClibfdt/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 2In 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, use dtc as the first prerequisite
so that "$(^D)" was expanded to "."Cc Peter Crosthwaite <[email protected]>Cc Blue Swirl <[email protected]>Signed-off-by Dunrong Huang <[email protected]>--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Makefile +0
-0@@ -148,7 +148,7 @@ $(SRC_PATH)/pixman/configure: DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)"LIBFDT_srcdir=$(SRC_PATH)/dtc/libfdt
DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS) -I$(BUILD_DIR)/dtcMakefile +1
-2-I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt -subdir-dtc:dtc/libfdt dtc/tests +subdir-dtc:dtc dtc/libfdt dtc/tests $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS)CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,)
Quoted 5 lines
Quoted 2 lines
dtc/%:
Does it work if the "-I$(<D) -I$(@D)" is added to
QEMU_INCLUDESinstead ofQEMU_CFLAGS?Yes, this way works for me.
rules.mak +0
-0
rules.mak MAKEFLAGS += -rR · line 19
Quoted 6 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)
and patch is good. Thanks for the fix.
Regards,
Peter
Quoted 12 lines
but I don't know if it will break other build, e.g. mingw build.
Quoted 3 lines
Paolo
--
Best Regards,Dunrong Huang