From patchwork Sat Jun 22 09:24:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 253401 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6235D2C0412 for ; Sat, 22 Jun 2013 19:29:58 +1000 (EST) Received: from localhost ([::1]:34897 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UqK8q-0007Kr-G7 for incoming@patchwork.ozlabs.org; Sat, 22 Jun 2013 05:29:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UqK6X-0003qm-Fq for qemu-devel@nongnu.org; Sat, 22 Jun 2013 05:27:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UqK6U-0006Az-WE for qemu-devel@nongnu.org; Sat, 22 Jun 2013 05:27:33 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:57993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UqK6U-0006Ab-Nh for qemu-devel@nongnu.org; Sat, 22 Jun 2013 05:27:30 -0400 Received: from gandalf.tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by isrv.corpit.ru (Postfix) with ESMTP id 14EE041E4B; Sat, 22 Jun 2013 13:27:30 +0400 (MSK) Received: by gandalf.tls.msk.ru (Postfix, from userid 1000) id 26C1556C; Sat, 22 Jun 2013 13:24:40 +0400 (MSK) From: Michael Tokarev To: Anthony Liguori Date: Sat, 22 Jun 2013 13:24:35 +0400 Message-Id: <1371893076-9643-17-git-send-email-mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1371893076-9643-1-git-send-email-mjt@msgid.tls.msk.ru> References: <1371893076-9643-1-git-send-email-mjt@msgid.tls.msk.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.62.121.231 Cc: Peter Maydell , Michael Tokarev , qemu-devel@nongnu.org Subject: [Qemu-devel] [PULL 16/17] Makefile: pass include directives to dtc via CPPFLAGS, not CFLAGS X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Peter Maydell 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 Signed-off-by: Michael Tokarev --- 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 $@