From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uq0x4-0004Ji-7y for qemu-devel@nongnu.org; Fri, 21 Jun 2013 09:00:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uq0wx-0005uB-RX for qemu-devel@nongnu.org; Fri, 21 Jun 2013 09:00:30 -0400 From: Peter Maydell Date: Fri, 21 Jun 2013 14:00:17 +0100 Message-Id: <1371819617-27232-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] Makefile: pass include directives to dtc via CPPFLAGS, not CFLAGS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Peter Crosthwaite , David Gibson , patches@linaro.org The dtc submodule's makefile expects -I include directives to be in CPPFLAGS, not CFLAGS. Getting this wrong meant that the include directive would not be applied when generating the dependency .d files. This in turn meant that we couldn't build libfdt when doing an out of tree build with clang. (gcc's dependency output is slightly different from clang in this situation so it happened to work.) Signed-off-by: Peter Maydell --- Tracking this down was not made any easier by make bug http://savannah.gnu.org/bugs/index.php?15110 which meant that make silently exited without saying anything about what was wrong... Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3cfa7d0..c06bfab 100644 --- a/Makefile +++ b/Makefile @@ -146,10 +146,11 @@ $(SRC_PATH)/pixman/configure: (cd $(SRC_PATH)/pixman; autoreconf -v --install) 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 +DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS) +DTC_CPPFLAGS=-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt subdir-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,) + $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CPPFLAGS)" CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,) dtc/%: mkdir -p $@ -- 1.7.9.5