Skip to contentSkip to conversation

sparc: Add missing "FORCE" target when using if_changed

PATCH In review Kees Cook 3 participants 4 messages Sep 23, 2021 – Oct 6, 2021 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 sparc: Add missing "FORCE" target when using if_changed

Fix observed warning:

/builds/linux/arch/sparc/boot/Makefile:35: FORCE prerequisite is missing

Fixes e1f86d7b4b2a5213 ("kbuild: warn if FORCE is missing for if_changed(_dep,_rule) and filechk")
Cc "David S. Miller" <[email protected]>
Cc Masahiro Yamada <[email protected]>

---
I'm not sure if this should go via sparc or via kbuild. :)

---
 arch/sparc/boot/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/sparc/boot/Makefile +4 -4
index 849236d4eca4..45e5c76d449e 100644
@@ -22,7 +22,7 @@ ifeq ($(CONFIG_SPARC64),y)
 
 # Actual linking
 
-$(obj)/zImage: $(obj)/image
+$(obj)/zImage: $(obj)/image FORCE
 	$(call if_changed,gzip)
 	@echo '  kernel: $@ is ready'
 
@@ -31,7 +31,7 @@ $(obj)/vmlinux.aout: vmlinux FORCE
 	@echo '  kernel: $@ is ready'
 else
 
-$(obj)/zImage: $(obj)/image
+$(obj)/zImage: $(obj)/image FORCE
 	$(call if_changed,strip)
 	@echo '  kernel: $@ is ready'
 
@@ -44,7 +44,7 @@ OBJCOPYFLAGS_image.bin := -S -O binary -R .note -R .comment
 $(obj)/image.bin: $(obj)/image FORCE
 	$(call if_changed,objcopy)
 
-$(obj)/image.gz: $(obj)/image.bin
+$(obj)/image.gz: $(obj)/image.bin FORCE
 	$(call if_changed,gzip)
 
 UIMAGE_LOADADDR = $(CONFIG_UBOOT_LOAD_ADDR)
@@ -56,7 +56,7 @@ quiet_cmd_uimage.o = UIMAGE.O $@
                      -r -b binary $@ -o [email protected]
 
 targets += uImage
-$(obj)/uImage: $(obj)/image.gz
+$(obj)/uImage: $(obj)/image.gz FORCE
 	$(call if_changed,uimage)
 	$(call if_changed,uimage.o)
 	@echo '  Image $@ is ready'
Signature · 1 line
2.30.2
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Kees Cook

Fix observed warning:

/builds/linux/arch/sparc/boot/Makefile:35: FORCE prerequisite is missing

Fixes e1f86d7b4b2a5213 ("kbuild: warn if FORCE is missing for if_changed(_dep,_rule) and filechk")
Cc "David S. Miller" <[email protected]>
Cc Masahiro Yamada <[email protected]>
Quoted 49 lines

---
I'm not sure if this should go via sparc or via kbuild. :)

---
 arch/sparc/boot/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/sparc/boot/Makefile +4 -4
index 849236d4eca4..45e5c76d449e 100644
@@ -22,7 +22,7 @@ ifeq ($(CONFIG_SPARC64),y)
 
 # Actual linking
 
-$(obj)/zImage: $(obj)/image
+$(obj)/zImage: $(obj)/image FORCE
 	$(call if_changed,gzip)
 	@echo '  kernel: $@ is ready'
 
@@ -31,7 +31,7 @@ $(obj)/vmlinux.aout: vmlinux FORCE
 	@echo '  kernel: $@ is ready'
 else
 
-$(obj)/zImage: $(obj)/image
+$(obj)/zImage: $(obj)/image FORCE
 	$(call if_changed,strip)
 	@echo '  kernel: $@ is ready'
 
@@ -44,7 +44,7 @@ OBJCOPYFLAGS_image.bin := -S -O binary -R .note -R .comment
 $(obj)/image.bin: $(obj)/image FORCE
 	$(call if_changed,objcopy)
 
-$(obj)/image.gz: $(obj)/image.bin
+$(obj)/image.gz: $(obj)/image.bin FORCE
 	$(call if_changed,gzip)
 
 UIMAGE_LOADADDR = $(CONFIG_UBOOT_LOAD_ADDR)
@@ -56,7 +56,7 @@ quiet_cmd_uimage.o = UIMAGE.O $@
                      -r -b binary $@ -o [email protected]
 
 targets += uImage
-$(obj)/uImage: $(obj)/image.gz
+$(obj)/uImage: $(obj)/image.gz FORCE
 	$(call if_changed,uimage)
 	$(call if_changed,uimage.o)
 	@echo '  Image $@ is ready'
Signature · 1 line
2.30.2
author
#2 lore raw
Quoted 5 lines · Nicolas Schier
Quoted 4 lines · Kees Cook

Fix observed warning:

/builds/linux/arch/sparc/boot/Makefile:35: FORCE prerequisite is missing

Quoted 7 lines
Quoted 5 lines
Fixes e1f86d7b4b2a5213 ("kbuild: warn if FORCE is missing for if_changed(_dep,_rule) and filechk")
Cc "David S. Miller" <[email protected]>
Cc Masahiro Yamada <[email protected]>

Thanks!

Masahiro, are you able to add this to your kbuild tree?

-Kees

Quoted 50 lines
Quoted 50 lines

---
I'm not sure if this should go via sparc or via kbuild. :)

---
 arch/sparc/boot/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/sparc/boot/Makefile +4 -4
index 849236d4eca4..45e5c76d449e 100644
@@ -22,7 +22,7 @@ ifeq ($(CONFIG_SPARC64),y)
 
 # Actual linking
 
-$(obj)/zImage: $(obj)/image
+$(obj)/zImage: $(obj)/image FORCE
 	$(call if_changed,gzip)
 	@echo '  kernel: $@ is ready'
 
@@ -31,7 +31,7 @@ $(obj)/vmlinux.aout: vmlinux FORCE
 	@echo '  kernel: $@ is ready'
 else
 
-$(obj)/zImage: $(obj)/image
+$(obj)/zImage: $(obj)/image FORCE
 	$(call if_changed,strip)
 	@echo '  kernel: $@ is ready'
 
@@ -44,7 +44,7 @@ OBJCOPYFLAGS_image.bin := -S -O binary -R .note -R .comment
 $(obj)/image.bin: $(obj)/image FORCE
 	$(call if_changed,objcopy)
 
-$(obj)/image.gz: $(obj)/image.bin
+$(obj)/image.gz: $(obj)/image.bin FORCE
 	$(call if_changed,gzip)
 
 UIMAGE_LOADADDR = $(CONFIG_UBOOT_LOAD_ADDR)
@@ -56,7 +56,7 @@ quiet_cmd_uimage.o = UIMAGE.O $@
                      -r -b binary $@ -o [email protected]
 
 targets += uImage
-$(obj)/uImage: $(obj)/image.gz
+$(obj)/uImage: $(obj)/image.gz FORCE
 	$(call if_changed,uimage)
 	$(call if_changed,uimage.o)
 	@echo '  Image $@ is ready'
Signature · 1 line
2.30.2
Signature · 1 line
Kees Cook
#3 lore raw
Quoted 13 lines · Kees Cook
Quoted 11 lines · Nicolas Schier
Quoted 9 lines · Kees Cook

Fix observed warning:

/builds/linux/arch/sparc/boot/Makefile:35: FORCE prerequisite is missing

Fixes e1f86d7b4b2a5213 ("kbuild: warn if FORCE is missing for if_changed(_dep,_rule) and filechk")
Cc "David S. Miller" <[email protected]>
Cc Masahiro Yamada <[email protected]>
Quoted 5 lines
Quoted 1 line

Thanks!

Masahiro, are you able to add this to your kbuild tree?

Sure, applied to linux-kbuild. Thanks.

Quoted 55 lines

-Kees

Quoted 41 lines
Quoted 41 lines

---
I'm not sure if this should go via sparc or via kbuild. :)

---
 arch/sparc/boot/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/sparc/boot/Makefile +3 -3
index 849236d4eca4..45e5c76d449e 100644
@@ -22,7 +22,7 @@ ifeq ($(CONFIG_SPARC64),y)
 
 # Actual linking
 
-$(obj)/zImage: $(obj)/image
+$(obj)/zImage: $(obj)/image FORCE
    $(call if_changed,gzip)
    @echo '  kernel: $@ is ready'
 
@@ -31,7 +31,7 @@ $(obj)/vmlinux.aout: vmlinux FORCE
    @echo '  kernel: $@ is ready'
 else
 
-$(obj)/zImage: $(obj)/image
+$(obj)/zImage: $(obj)/image FORCE
    $(call if_changed,strip)
    @echo '  kernel: $@ is ready'
 
@@ -44,7 +44,7 @@ OBJCOPYFLAGS_image.bin := -S -O binary -R .note -R .comment
 $(obj)/image.bin: $(obj)/image FORCE
    $(call if_changed,objcopy)
 
-$(obj)/image.gz: $(obj)/image.bin
+$(obj)/image.gz: $(obj)/image.bin FORCE
    $(call if_changed,gzip)
 
 UIMAGE_LOADADDR = $(CONFIG_UBOOT_LOAD_ADDR)
@@ -56,7 +56,7 @@ quiet_cmd_uimage.o = UIMAGE.O $@
                      -r -b binary $@ -o [email protected]
 
Quoted 9 lines
Quoted 9 lines
arch/sparc/boot/Makefile +1 -2
 targets += uImage
-$(obj)/uImage: $(obj)/image.gz
+$(obj)/uImage: $(obj)/image.gz FORCE
    $(call if_changed,uimage)
    $(call if_changed,uimage.o)
    @echo '  Image $@ is ready'
--

2.30.2

--
Kees Cook

Signature · 2 lines
Best Regards
Masahiro Yamada