From patchwork Fri Jun 3 10:07:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Chen X-Patchwork-Id: 9152537 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2F5BF60751 for ; Fri, 3 Jun 2016 10:09:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBEA526907 for ; Fri, 3 Jun 2016 10:09:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D0C3928309; Fri, 3 Jun 2016 10:09:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4C60926907 for ; Fri, 3 Jun 2016 10:09:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8m0h-0005f3-OZ; Fri, 03 Jun 2016 10:07:23 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8m0g-0005eu-UI for xen-devel@lists.xen.org; Fri, 03 Jun 2016 10:07:23 +0000 Received: from [85.158.143.35] by server-2.bemta-6.messagelabs.com id 07/34-06230-AD651575; Fri, 03 Jun 2016 10:07:22 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprJIsWRWlGSWpSXmKPExsVyMfTAKt2bYYH hBm+umlgs+biYxYHR4+ju30wBjFGsmXlJ+RUJrBmrnr1mLljDW7F78zfGBsZ27i5GLg4hgcmM Eq+WfGMEcVgE2pklJj65xA7iSAi8Y5GY0vWRpYuRE8iJkfh3rokZwi6TmLduM1sXIwdQu5JEx 4QKkLCQwE9GifP7TUFsNgEVie9v+lkhys0kzp+cyQRiiwhIS1z7fBlsGbPAbEaJjmXL2EESwg L2En+fXAXbxSKgKrHw9SqwZl4BC4lHTydA7VWSeHXlGMsERv4FjAyrGNWLU4vKUot0jfSSijL TM0pyEzNzdA0NzPRyU4uLE9NTcxKTivWS83M3MQIDiAEIdjAu++t0iFGSg0lJlPf82YBwIb6k /JTKjMTijPii0pzU4kOMMhwcShK8l0IDw4UEi1LTUyvSMnOAoQyTluDgURLh3Q+S5i0uSMwtz kyHSJ1iNObY8vvaWiaObVPvrWUSYsnLz0uVEufdCVIqAFKaUZoHNwgWY5cYZaWEeRmBThPiKU gtys0sQZV/xSjOwagkzPsRZApPZl4J3L5XQKcwAZ1S8Mgf5JSSRISUVAMjax1/grR35fwbc53 2tEz4sKL+FPuVdUrXLP+cuNH2c2nYXJlt+rLLe4KrpnyLta4V2mvdeObw371XE5k0ddhS2Uum lJ0Ka3zXYBhot+NmaVD887txL78GtcRFb67QDdJP2yK4u6h0X/7Fs68nKvy7qqFSPHta7cRpx dLP5m+8PLMkze17/w8hJZbijERDLeai4kQAtjZGwKwCAAA= X-Env-Sender: wei.chen@linaro.org X-Msg-Ref: server-5.tower-21.messagelabs.com!1464948440!17235633!1 X-Originating-IP: [209.85.192.170] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 19060 invoked from network); 3 Jun 2016 10:07:21 -0000 Received: from mail-pf0-f170.google.com (HELO mail-pf0-f170.google.com) (209.85.192.170) by server-5.tower-21.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 3 Jun 2016 10:07:21 -0000 Received: by mail-pf0-f170.google.com with SMTP id f144so42344507pfa.3 for ; Fri, 03 Jun 2016 03:07:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=E8IlEHTN7L2kqgHTYrQyBNIGRcbq4r3pMvTwEosXyWM=; b=D2uoBRQARzX1kJ5O7ixMwQa06u9YKHqTDMQxGdtf5fWashLWJEyMoDQBFnl/4Lig57 g/MW9XmJnXAw9KWfJ28u9QsMjGzkjpSSJTHLy2iuKBt04HjY1WDysAA2HQPCAmIPJMCr iBkhhYyb5PrJ7bk7z2KzQxNDY4Y/bEIU2JFgY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=E8IlEHTN7L2kqgHTYrQyBNIGRcbq4r3pMvTwEosXyWM=; b=aMl6swjYuFB+eX2E7awTz45aXEYYh7biHKTQzmI7vB9fPDL4wT9UoNGBLRe2qw+KQS 3ZsnWfRdTGhgI1fRjTYM+lRqXGKHXwIRX7XRUmY8aHWtnVOjotdddqQSlJwTJrDws9V3 rgwhY5gqPzoktpw4vKtp8MuHhJAWiLQnDwj2DELHTUUpCCZDiJirQKw1l6ghk2/Nlr06 KXbMI0k6HTm5RIWeQM7k5Q0rAbd5BDF+DJiixqk21DJ6sf1qrG/mnBViTbrRB9uYbQvJ rw/JE0h2qLSci3xlxYBMz8vy4hiv0j6Vhy+bgkSWVboP2m/zdzFQwHykgUC5qzz3y3ra TQ8w== X-Gm-Message-State: ALyK8tK7cyWMEfR807R8R5SG4A+u3Ys74VXSORIzh+0T/9rhynYf5tNjuBFU4daA1lhOL/Yh X-Received: by 10.98.88.6 with SMTP id m6mr1737219pfb.100.1464948439003; Fri, 03 Jun 2016 03:07:19 -0700 (PDT) Received: from localhost.members.linode.com ([2400:8900::f03c:91ff:fe56:1324]) by smtp.gmail.com with ESMTPSA id 205sm7115041pfy.32.2016.06.03.03.07.16 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 03 Jun 2016 03:07:18 -0700 (PDT) From: Wei Chen X-Google-Original-From: Wei Chen To: xen-devel@lists.xen.org Date: Fri, 3 Jun 2016 18:07:13 +0800 Message-Id: <20160603100713.22378-1-Wei.Chen@linaro.org> X-Mailer: git-send-email 2.9.0.rc0 Cc: sstabellini@kernel.org, wei.liu2@citrix.com, steve.capper@arm.com, andrew.cooper3@citrix.com, julien.grall@arm.com, Wei Chen Subject: [Xen-devel] [RFC] xen/arm: build: add missed dependency for head.S X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP When we update the header files that had been included in head.S. The build system would not re-compile the head.S. Because in the build rules, the dependencies are setting to .*.d (eg. DEPS = .*.d) files in the same folder as Makefile. But head.S is very special, it was used by the Makefile in the parent folder: "ALL_OBJS := $(TARGET_SUBARCH)/head.o". In this case, the build system could not find the dependency in DEPS. When we update the header files, the build system is unware of this update. If we re-build the Xen without doing make clean or touching the head.S, the build system will not recompile the head.S. Signed-off-by: Wei Chen Acked-by: Ian Jackson --- In my mind, the better way to fix this bug is converting the DEPS from ALL_OBJS. But I am afraid of the impact. I am not sure whether there are some dependencies are not generated from obj files. --- xen/Rules.mk | 3 ++- xen/arch/arm/Makefile | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 961d533..1247b61 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -92,9 +92,10 @@ LDFLAGS += $(LDFLAGS-y) include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk +DEPS = .*.d + include Makefile -DEPS = .*.d define gendep ifneq ($(1),$(subst /,:,$(1))) DEPS += $(dir $(1)).$(notdir $(1)).d diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index af4d0e1..9e38da3 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -51,6 +51,8 @@ endif ALL_OBJS := $(TARGET_SUBARCH)/head.o $(ALL_OBJS) +DEPS += $(TARGET_SUBARCH)/.head.o.d + $(TARGET): $(TARGET)-syms $(TARGET).axf $(OBJCOPY) -O binary -S $< $@ ifeq ($(CONFIG_ARM_64),y)