All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] sh: fix build error for invisible CONFIG_BUILTIN_DTB_SOURCE
@ 2019-02-04  9:10 ` Masahiro Yamada
  0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2019-02-04  9:10 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-sh, devicetree, Rob Herring, Masahiro Yamada,
	Yoshinori Sato, linux-kernel, Rich Felker, Mark Rutland

I fixed a similar build error in commit 1b1e4ee86e00 ("sh: fix build
error for empty CONFIG_BUILTIN_DTB_SOURCE"), but it came back again.

Since commit 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb
build rules"), the combination of CONFIG_OF_EARLY_FLATTREE=y and
CONFIG_USE_BUILTIN_DTB=n results in the following build error:

make[1]: *** No rule to make target 'arch/sh/boot/dts/.dtb.o', needed by 'arch/sh/boot/dts/built-in.a'.  Stop.
make: *** [Makefile;1727: arch/sh/boot/dts/] Error 2

Prior to that commit, there was only one path to descend into
arch/sh/boot/dts/, and arch/sh/Makefile correctly guards it with
CONFIG_USE_BUILTIN_DTB:

  core-$(CONFIG_USE_BUILTIN_DTB)  += arch/sh/boot/dts/

Now, there is another path to descend there from the top Makefile
when CONFIG_OF_EARLY_FLATTREE=y. If CONFIG_USE_BUILTIN_DTB is disabled,
CONFIG_BUILTIN_DTB_SOURCE is invisible instead of defined as "".

Add obj-$(CONFIG_USE_BUILTIN_DTB) guard to avoid the attempt to build
the non-existing file.

Fixes: 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb build rules")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

Observant reviewers may point out another problem.
There is a race condition when CONFIG_OF_EARLY_FLATTREE=y.

Some architectures (sh, xtensa, etc.) embed a DTB in vmlinux,
so there are two paths to descend into arch/*/boot/dts/.
For parallel build with -j<N> option, two threads may build
under arch/*/boot/dts/ simultaneously.

Yes, this is a problem, and it is in my TODO list.
For some reasons, I will postpone it by the next development cycle.

For now, I want to fix this sh build error first because kbuild test
robot is still complaining about it.


Changes in v2:
  - Change the subject a bit because the cause of the error is different

 arch/sh/boot/dts/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sh/boot/dts/Makefile b/arch/sh/boot/dts/Makefile
index 01d0f7f..2563d1e 100644
--- a/arch/sh/boot/dts/Makefile
+++ b/arch/sh/boot/dts/Makefile
@@ -1,3 +1,3 @@
 ifneq ($(CONFIG_BUILTIN_DTB_SOURCE),"")
-obj-y += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o
+obj-$(CONFIG_USE_BUILTIN_DTB) += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o
 endif
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2] sh: fix build error for invisible CONFIG_BUILTIN_DTB_SOURCE
@ 2019-02-04  9:10 ` Masahiro Yamada
  0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2019-02-04  9:10 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-sh, devicetree, Rob Herring, Masahiro Yamada,
	Yoshinori Sato, linux-kernel, Rich Felker, Mark Rutland

I fixed a similar build error in commit 1b1e4ee86e00 ("sh: fix build
error for empty CONFIG_BUILTIN_DTB_SOURCE"), but it came back again.

Since commit 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb
build rules"), the combination of CONFIG_OF_EARLY_FLATTREE=y and
CONFIG_USE_BUILTIN_DTB=n results in the following build error:

make[1]: *** No rule to make target 'arch/sh/boot/dts/.dtb.o', needed by 'arch/sh/boot/dts/built-in.a'.  Stop.
make: *** [Makefile;1727: arch/sh/boot/dts/] Error 2

Prior to that commit, there was only one path to descend into
arch/sh/boot/dts/, and arch/sh/Makefile correctly guards it with
CONFIG_USE_BUILTIN_DTB:

  core-$(CONFIG_USE_BUILTIN_DTB)  += arch/sh/boot/dts/

Now, there is another path to descend there from the top Makefile
when CONFIG_OF_EARLY_FLATTREE=y. If CONFIG_USE_BUILTIN_DTB is disabled,
CONFIG_BUILTIN_DTB_SOURCE is invisible instead of defined as "".

Add obj-$(CONFIG_USE_BUILTIN_DTB) guard to avoid the attempt to build
the non-existing file.

Fixes: 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb build rules")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

Observant reviewers may point out another problem.
There is a race condition when CONFIG_OF_EARLY_FLATTREE=y.

Some architectures (sh, xtensa, etc.) embed a DTB in vmlinux,
so there are two paths to descend into arch/*/boot/dts/.
For parallel build with -j<N> option, two threads may build
under arch/*/boot/dts/ simultaneously.

Yes, this is a problem, and it is in my TODO list.
For some reasons, I will postpone it by the next development cycle.

For now, I want to fix this sh build error first because kbuild test
robot is still complaining about it.


Changes in v2:
  - Change the subject a bit because the cause of the error is different

 arch/sh/boot/dts/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sh/boot/dts/Makefile b/arch/sh/boot/dts/Makefile
index 01d0f7f..2563d1e 100644
--- a/arch/sh/boot/dts/Makefile
+++ b/arch/sh/boot/dts/Makefile
@@ -1,3 +1,3 @@
 ifneq ($(CONFIG_BUILTIN_DTB_SOURCE),"")
-obj-y += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o
+obj-$(CONFIG_USE_BUILTIN_DTB) += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o
 endif
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] sh: fix build error for invisible CONFIG_BUILTIN_DTB_SOURCE
  2019-02-04  9:10 ` Masahiro Yamada
@ 2019-02-14  2:07   ` Masahiro Yamada
  -1 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2019-02-14  2:07 UTC (permalink / raw)
  To: Linux Kbuild mailing list
  Cc: Linux-sh list, DTML, Rob Herring, Yoshinori Sato,
	Linux Kernel Mailing List, Rich Felker, Mark Rutland

On Mon, Feb 4, 2019 at 6:11 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> I fixed a similar build error in commit 1b1e4ee86e00 ("sh: fix build
> error for empty CONFIG_BUILTIN_DTB_SOURCE"), but it came back again.
>
> Since commit 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb
> build rules"), the combination of CONFIG_OF_EARLY_FLATTREE=y and
> CONFIG_USE_BUILTIN_DTB=n results in the following build error:
>
> make[1]: *** No rule to make target 'arch/sh/boot/dts/.dtb.o', needed by 'arch/sh/boot/dts/built-in.a'.  Stop.
> make: *** [Makefile;1727: arch/sh/boot/dts/] Error 2
>
> Prior to that commit, there was only one path to descend into
> arch/sh/boot/dts/, and arch/sh/Makefile correctly guards it with
> CONFIG_USE_BUILTIN_DTB:
>
>   core-$(CONFIG_USE_BUILTIN_DTB)  += arch/sh/boot/dts/
>
> Now, there is another path to descend there from the top Makefile
> when CONFIG_OF_EARLY_FLATTREE=y. If CONFIG_USE_BUILTIN_DTB is disabled,
> CONFIG_BUILTIN_DTB_SOURCE is invisible instead of defined as "".
>
> Add obj-$(CONFIG_USE_BUILTIN_DTB) guard to avoid the attempt to build
> the non-existing file.
>
> Fixes: 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb build rules")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


Applied to linux-kbuild/fixes.



> ---
>
> Observant reviewers may point out another problem.
> There is a race condition when CONFIG_OF_EARLY_FLATTREE=y.
>
> Some architectures (sh, xtensa, etc.) embed a DTB in vmlinux,
> so there are two paths to descend into arch/*/boot/dts/.
> For parallel build with -j<N> option, two threads may build
> under arch/*/boot/dts/ simultaneously.
>
> Yes, this is a problem, and it is in my TODO list.
> For some reasons, I will postpone it by the next development cycle.
>
> For now, I want to fix this sh build error first because kbuild test
> robot is still complaining about it.
>
>
> Changes in v2:
>   - Change the subject a bit because the cause of the error is different
>
>  arch/sh/boot/dts/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/sh/boot/dts/Makefile b/arch/sh/boot/dts/Makefile
> index 01d0f7f..2563d1e 100644
> --- a/arch/sh/boot/dts/Makefile
> +++ b/arch/sh/boot/dts/Makefile
> @@ -1,3 +1,3 @@
>  ifneq ($(CONFIG_BUILTIN_DTB_SOURCE),"")
> -obj-y += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o
> +obj-$(CONFIG_USE_BUILTIN_DTB) += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o
>  endif
> --
> 2.7.4
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] sh: fix build error for invisible CONFIG_BUILTIN_DTB_SOURCE
@ 2019-02-14  2:07   ` Masahiro Yamada
  0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2019-02-14  2:07 UTC (permalink / raw)
  To: Linux Kbuild mailing list
  Cc: Linux-sh list, DTML, Rob Herring, Yoshinori Sato,
	Linux Kernel Mailing List, Rich Felker, Mark Rutland

On Mon, Feb 4, 2019 at 6:11 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> I fixed a similar build error in commit 1b1e4ee86e00 ("sh: fix build
> error for empty CONFIG_BUILTIN_DTB_SOURCE"), but it came back again.
>
> Since commit 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb
> build rules"), the combination of CONFIG_OF_EARLY_FLATTREE=y and
> CONFIG_USE_BUILTIN_DTB=n results in the following build error:
>
> make[1]: *** No rule to make target 'arch/sh/boot/dts/.dtb.o', needed by 'arch/sh/boot/dts/built-in.a'.  Stop.
> make: *** [Makefile;1727: arch/sh/boot/dts/] Error 2
>
> Prior to that commit, there was only one path to descend into
> arch/sh/boot/dts/, and arch/sh/Makefile correctly guards it with
> CONFIG_USE_BUILTIN_DTB:
>
>   core-$(CONFIG_USE_BUILTIN_DTB)  += arch/sh/boot/dts/
>
> Now, there is another path to descend there from the top Makefile
> when CONFIG_OF_EARLY_FLATTREE=y. If CONFIG_USE_BUILTIN_DTB is disabled,
> CONFIG_BUILTIN_DTB_SOURCE is invisible instead of defined as "".
>
> Add obj-$(CONFIG_USE_BUILTIN_DTB) guard to avoid the attempt to build
> the non-existing file.
>
> Fixes: 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb build rules")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


Applied to linux-kbuild/fixes.



> ---
>
> Observant reviewers may point out another problem.
> There is a race condition when CONFIG_OF_EARLY_FLATTREE=y.
>
> Some architectures (sh, xtensa, etc.) embed a DTB in vmlinux,
> so there are two paths to descend into arch/*/boot/dts/.
> For parallel build with -j<N> option, two threads may build
> under arch/*/boot/dts/ simultaneously.
>
> Yes, this is a problem, and it is in my TODO list.
> For some reasons, I will postpone it by the next development cycle.
>
> For now, I want to fix this sh build error first because kbuild test
> robot is still complaining about it.
>
>
> Changes in v2:
>   - Change the subject a bit because the cause of the error is different
>
>  arch/sh/boot/dts/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/sh/boot/dts/Makefile b/arch/sh/boot/dts/Makefile
> index 01d0f7f..2563d1e 100644
> --- a/arch/sh/boot/dts/Makefile
> +++ b/arch/sh/boot/dts/Makefile
> @@ -1,3 +1,3 @@
>  ifneq ($(CONFIG_BUILTIN_DTB_SOURCE),"")
> -obj-y += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o
> +obj-$(CONFIG_USE_BUILTIN_DTB) += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o
>  endif
> --
> 2.7.4
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-02-14  2:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-04  9:10 [PATCH v2] sh: fix build error for invisible CONFIG_BUILTIN_DTB_SOURCE Masahiro Yamada
2019-02-04  9:10 ` Masahiro Yamada
2019-02-14  2:07 ` Masahiro Yamada
2019-02-14  2:07   ` Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.