2021-08-11 16:40:13

by Masahiro Yamada

[permalink] [raw]
Subject: [PATCH 2/4] xtensa: do not build variants directory

None of arch/xtensa/variants/*/ has Makefile, so 'buildvar' is always
empty.

Perhaps, downstream variant code might be dropped in, but given the
fact that none of upstream variants builds anything in their variant
directory, I doubt this is needed.

Signed-off-by: Masahiro Yamada <[email protected]>
---

arch/xtensa/Makefile | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile
index 6fab7fc87579..3c0573fe6761 100644
--- a/arch/xtensa/Makefile
+++ b/arch/xtensa/Makefile
@@ -55,9 +55,7 @@ KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(vardirs) $(plfdirs))

KBUILD_DEFCONFIG := iss_defconfig

-# Only build variant and/or platform if it includes a Makefile
-
-buildvar := $(shell test -e $(srctree)/arch/xtensa/variants/$(VARIANT)/Makefile && echo arch/xtensa/variants/$(VARIANT)/)
+# Only build platform if it includes a Makefile
buildplf := $(shell test -e $(srctree)/arch/xtensa/platforms/$(PLATFORM)/Makefile && echo arch/xtensa/platforms/$(PLATFORM)/)

# Find libgcc.a
@@ -66,7 +64,7 @@ LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)

head-y := arch/xtensa/kernel/head.o
core-y += arch/xtensa/kernel/ arch/xtensa/mm/
-core-y += $(buildvar) $(buildplf)
+core-y += $(buildplf)
core-y += arch/xtensa/boot/dts/

libs-y += arch/xtensa/lib/ $(LIBGCC)
--
2.30.2


2021-08-13 05:44:14

by Max Filippov

[permalink] [raw]
Subject: Re: [PATCH 2/4] xtensa: do not build variants directory

On Wed, Aug 11, 2021 at 9:38 AM Masahiro Yamada <[email protected]> wrote:
>
> None of arch/xtensa/variants/*/ has Makefile, so 'buildvar' is always
> empty.
>
> Perhaps, downstream variant code might be dropped in, but given the
> fact that none of upstream variants builds anything in their variant
> directory, I doubt this is needed.
>
> Signed-off-by: Masahiro Yamada <[email protected]>
> ---
>
> arch/xtensa/Makefile | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)

Thanks, applied to my xtensa tree.

--
Thanks.
-- Max