xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Wei Chen <wei.chen@linaro.org>, xen-devel@lists.xen.org
Cc: andrew.cooper3@citrix.com, sstabellini@kernel.org,
	wei.liu2@citrix.com, Ian Jackson <Ian.Jackson@eu.citrix.com>,
	steve.capper@arm.com
Subject: Re: [RFC] xen/arm: build: add missed dependency for head.S
Date: Mon, 6 Jun 2016 18:08:54 +0100	[thread overview]
Message-ID: <5755AE26.8020205@arm.com> (raw)
In-Reply-To: <20160603100713.22378-1-Wei.Chen@linaro.org>

(CC Ian)

Hi,

On 03/06/16 11:07, Wei Chen wrote:
> 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 <Wei.Chen@linaro.org>
> ---
> 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.

My knowledge of the build system is limited. Stefano, Ian, Wei, could 
you give a look?

Regards,

> ---
> 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)
>

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-06-06 17:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03 10:07 [RFC] xen/arm: build: add missed dependency for head.S Wei Chen
2016-06-06 17:08 ` Julien Grall [this message]
2016-06-07 10:03   ` Ian Jackson
2016-06-07  4:34     ` [RFC v2] " Wei Chen
2016-06-07 13:18       ` Konrad Rzeszutek Wilk
2016-06-08  3:10         ` Wei Chen
2016-06-07 16:01       ` [RFC v2] xen/arm: build: add missed dependency for head.S [and 1 more messages] Ian Jackson
2016-06-07 16:24         ` Wei Liu
2016-06-08  3:14           ` Wei Chen
2016-06-08  8:09             ` Wei Liu
2016-06-07 10:07     ` [RFC] xen/arm: build: add missed dependency for head.S Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5755AE26.8020205@arm.com \
    --to=julien.grall@arm.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=steve.capper@arm.com \
    --cc=wei.chen@linaro.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).