Skip to contentSkip to conversation

xtensa: add boot subdirectories build artifacts to 'targets'

PATCH In review Masahiro Yamada 2 participants 3 messages Jul 22, 2020 – Jul 25, 2020 Tensilica Xtensa port (xtensa)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xtensa: add boot subdirectories build artifacts to 'targets'

Xtensa always rebuilds the following even if nothing in the source code has been changed. Passing V=2 shows the reason.

  AS      arch/xtensa/boot/boot-elf/bootstrap.o - due to bootstrap.o not in $(targets)
  LDS     arch/xtensa/boot/boot-elf/boot.lds - due to boot.lds not in $(targets)

They are built by if_changed(_dep). Add them to 'targets' so .*.cmd files are included.

---

 arch/xtensa/boot/boot-elf/Makefile     | 1 +
 arch/xtensa/boot/boot-redboot/Makefile | 1 +
 2 files changed, 2 insertions(+)
arch/xtensa/boot/boot-elf/Makefile +1 -0
index 12ae1e91cb75..badee63dae27 100644
@@ -15,6 +15,7 @@ export CPPFLAGS_boot.lds += -P -C
 export KBUILD_AFLAGS += -mtext-section-literals
 
 boot-y		:= bootstrap.o
+targets		+= $(boot-y) boot.lds
 
 OBJS		:= $(addprefix $(obj)/,$(boot-y))
 
arch/xtensa/boot/boot-redboot/Makefile +1 -0
index 8632473ad319..1a277dd57b2a 100644
@@ -13,6 +13,7 @@ endif
 LD_ARGS	= -T $(srctree)/$(obj)/boot.ld
 
 boot-y	:= bootstrap.o
+targets	+= $(boot-y)
 
 OBJS	:= $(addprefix $(obj)/,$(boot-y))
 LIBS	:= arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a
Signature · 1 line
2.25.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Masahiro Yamada

Xtensa always rebuilds the following even if nothing in the source code has been changed. Passing V=2 shows the reason.

  AS      arch/xtensa/boot/boot-elf/bootstrap.o - due to bootstrap.o not in $(targets)
  LDS     arch/xtensa/boot/boot-elf/boot.lds - due to boot.lds not in $(targets)

They are built by if_changed(_dep). Add them to 'targets' so .*.cmd files are included.

Quoted 6 lines

---

 arch/xtensa/boot/boot-elf/Makefile     | 1 +
 arch/xtensa/boot/boot-redboot/Makefile | 1 +
 2 files changed, 2 insertions(+)
Signature · 2 lines
Thanks.
-- Max
#2 lore raw
Quoted 19 lines · Max Filippov
Quoted 10 lines · Masahiro Yamada

Xtensa always rebuilds the following even if nothing in the source code has been changed. Passing V=2 shows the reason.

  AS      arch/xtensa/boot/boot-elf/bootstrap.o - due to bootstrap.o not in $(targets)
  LDS     arch/xtensa/boot/boot-elf/boot.lds - due to boot.lds not in $(targets)

They are built by if_changed(_dep). Add them to 'targets' so .*.cmd files are included.

Quoted 6 lines

---

 arch/xtensa/boot/boot-elf/Makefile     | 1 +
 arch/xtensa/boot/boot-redboot/Makefile | 1 +
 2 files changed, 2 insertions(+)
Quoted 5 lines

--
Thanks.
-- Max

Applied to linux-kbuild.

Signature · 2 lines
Best Regards
Masahiro Yamada