linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] kbuild: add real-prereqs shorthand for $(filter-out FORCE,$^)
       [not found] <1547698231-20985-1-git-send-email-yamada.masahiro@socionext.com>
@ 2019-01-17  4:10 ` Masahiro Yamada
  2019-01-17  4:22   ` [PATCH 2/3] kbuild: add real-prereqs shorthand for $(filter-out FORCE, $^) Alexey Kardashevskiy
  0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2019-01-17  4:10 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Masahiro Yamada, Borislav Petkov, linux-mips, Rob Herring,
	Nicholas Piggin, James Hogan, x86, Thomas Gleixner,
	Mauro S. M. Rodrigues, Ralf Baechle, Mark Greer, devicetree,
	H. Peter Anvin, Benjamin Herrenschmidt, Michal Marek,
	Paul Burton, Ingo Molnar, Joel Stanley, Kees Cook,
	Michael Ellerman, linux-kernel, Paul Mackerras, Mark Rutland,
	linuxppc-dev

In Kbuild, if_changed and friends must have FORCE as a prerequisite.

Hence, $(filter-out FORCE,$^) or $(filter-out $(PHONY),$^) is a common
pattern to get the names of all the prerequisites except phony targets.

Add real-prereqs as a shorthand.

Note:
We cannot replace $(filter %.o,$^) in cmd_link_multi-m because $^ may
include auto-generated dependencies from the .*.cmd file when a single
object module is changed into a multi object module. For details,
see commit 69ea912fda74 ("kbuild: remove unneeded link_multi_deps").
I added a comment to avoid accidental breakage.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 Documentation/devicetree/bindings/Makefile |  2 +-
 arch/mips/boot/Makefile                    |  2 +-
 arch/powerpc/boot/Makefile                 |  2 +-
 arch/x86/realmode/rm/Makefile              |  3 +--
 scripts/Kbuild.include                     |  4 ++++
 scripts/Makefile.build                     |  9 ++++++---
 scripts/Makefile.lib                       | 18 +++++++++---------
 scripts/Makefile.modpost                   |  2 +-
 8 files changed, 24 insertions(+), 18 deletions(-)

diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile
index 6e5cef0..e4eb5d1 100644
--- a/Documentation/devicetree/bindings/Makefile
+++ b/Documentation/devicetree/bindings/Makefile
@@ -15,7 +15,7 @@ DT_TMP_SCHEMA := processed-schema.yaml
 extra-y += $(DT_TMP_SCHEMA)
 
 quiet_cmd_mk_schema = SCHEMA  $@
-      cmd_mk_schema = $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) -o $@ $(filter-out FORCE, $^)
+      cmd_mk_schema = $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) -o $@ $(real-prereqs)
 
 DT_DOCS = $(shell cd $(srctree)/$(src) && find * -name '*.yaml')
 DT_SCHEMA_FILES ?= $(addprefix $(src)/,$(DT_DOCS))
diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile
index 35704c2..3ce4dd5 100644
--- a/arch/mips/boot/Makefile
+++ b/arch/mips/boot/Makefile
@@ -115,7 +115,7 @@ endif
 targets += vmlinux.its.S
 
 quiet_cmd_its_cat = CAT     $@
-      cmd_its_cat = cat $(filter-out $(PHONY), $^) >$@
+      cmd_its_cat = cat $(real-prereqs) >$@
 
 $(obj)/vmlinux.its.S: $(addprefix $(srctree)/arch/mips/$(PLATFORM)/,$(ITS_INPUTS)) FORCE
 	$(call if_changed,its_cat)
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 0e8dadd..73d1f35 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -218,7 +218,7 @@ quiet_cmd_bootas = BOOTAS  $@
       cmd_bootas = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $<
 
 quiet_cmd_bootar = BOOTAR  $@
-      cmd_bootar = $(BOOTAR) $(BOOTARFLAGS) $@.$$$$ $(filter-out FORCE,$^); mv $@.$$$$ $@
+      cmd_bootar = $(BOOTAR) $(BOOTARFLAGS) $@.$$$$ $(real-prereqs); mv $@.$$$$ $@
 
 $(obj-libfdt): $(obj)/%.o: $(srctree)/scripts/dtc/libfdt/%.c FORCE
 	$(call if_changed_dep,bootcc)
diff --git a/arch/x86/realmode/rm/Makefile b/arch/x86/realmode/rm/Makefile
index 4463fa7..394377c 100644
--- a/arch/x86/realmode/rm/Makefile
+++ b/arch/x86/realmode/rm/Makefile
@@ -37,8 +37,7 @@ REALMODE_OBJS = $(addprefix $(obj)/,$(realmode-y))
 sed-pasyms := -n -r -e 's/^([0-9a-fA-F]+) [ABCDGRSTVW] (.+)$$/pa_\2 = \2;/p'
 
 quiet_cmd_pasyms = PASYMS  $@
-      cmd_pasyms = $(NM) $(filter-out FORCE,$^) | \
-		   sed $(sed-pasyms) | sort | uniq > $@
+      cmd_pasyms = $(NM) $(real-prereqs) | sed $(sed-pasyms) | sort | uniq > $@
 
 targets += pasyms.h
 $(obj)/pasyms.h: $(REALMODE_OBJS) FORCE
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 3081603..d93250b 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -24,6 +24,10 @@ depfile = $(subst $(comma),_,$(dot-target).d)
 basetarget = $(basename $(notdir $@))
 
 ###
+# real prerequisites without phony targets
+real-prereqs = $(filter-out $(PHONY), $^)
+
+###
 # Escape single quote for use in echo statements
 escsq = $(subst $(squote),'\$(squote)',$1)
 
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 681ab58..9800178 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -399,8 +399,7 @@ $(sort $(subdir-obj-y)): $(subdir-ym) ;
 ifdef builtin-target
 
 quiet_cmd_ar_builtin = AR      $@
-      cmd_ar_builtin = rm -f $@; \
-                     $(AR) rcSTP$(KBUILD_ARFLAGS) $@ $(filter $(real-obj-y), $^)
+      cmd_ar_builtin = rm -f $@; $(AR) rcSTP$(KBUILD_ARFLAGS) $@ $(real-prereqs)
 
 $(builtin-target): $(real-obj-y) FORCE
 	$(call if_changed,ar_builtin)
@@ -428,7 +427,7 @@ ifdef lib-target
 quiet_cmd_link_l_target = AR      $@
 
 # lib target archives do get a symbol table and index
-cmd_link_l_target = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(lib-y)
+cmd_link_l_target = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs)
 
 $(lib-target): $(lib-y) FORCE
 	$(call if_changed,link_l_target)
@@ -453,6 +452,10 @@ targets += $(obj)/lib-ksyms.o
 
 endif
 
+# NOTE:
+# Do not replace $(filter %.o,^) with $(real-prereqs). When a single object
+# module is turned into a multi object module, $^ will contain header file
+# dependencies recorded in the .*.cmd file.
 quiet_cmd_link_multi-m = LD [M]  $@
 cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ $(filter %.o,$^) $(cmd_secanalysis)
 
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index ebaa348..c6fc295 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -231,7 +231,7 @@ $(obj)/%: $(src)/%_shipped
 # ---------------------------------------------------------------------------
 
 quiet_cmd_ld = LD      $@
-cmd_ld = $(LD) $(ld_flags) $(filter-out FORCE,$^) -o $@
+      cmd_ld = $(LD) $(ld_flags) $(real-prereqs) -o $@
 
 # Objcopy
 # ---------------------------------------------------------------------------
@@ -243,7 +243,7 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
 # ---------------------------------------------------------------------------
 
 quiet_cmd_gzip = GZIP    $@
-      cmd_gzip = cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@
+      cmd_gzip = cat $(real-prereqs) | gzip -n -f -9 > $@
 
 # DTC
 # ---------------------------------------------------------------------------
@@ -321,7 +321,7 @@ dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
 # append the size as a 32-bit littleendian number as gzip does.
 size_append = printf $(shell						\
 dec_size=0;								\
-for F in $(filter-out FORCE,$^); do					\
+for F in $(real-prereqs); do					\
 	fsize=$$($(CONFIG_SHELL) $(srctree)/scripts/file-size.sh $$F);	\
 	dec_size=$$(expr $$dec_size + $$fsize);				\
 done;									\
@@ -335,19 +335,19 @@ printf "%08x\n" $$dec_size |						\
 )
 
 quiet_cmd_bzip2 = BZIP2   $@
-      cmd_bzip2 = (cat $(filter-out FORCE,$^) | bzip2 -9 && $(size_append)) > $@
+      cmd_bzip2 = (cat $(real-prereqs) | bzip2 -9 && $(size_append)) > $@
 
 # Lzma
 # ---------------------------------------------------------------------------
 
 quiet_cmd_lzma = LZMA    $@
-      cmd_lzma = (cat $(filter-out FORCE,$^) | lzma -9 && $(size_append)) > $@
+      cmd_lzma = (cat $(real-prereqs) | lzma -9 && $(size_append)) > $@
 
 quiet_cmd_lzo = LZO     $@
-      cmd_lzo = (cat $(filter-out FORCE,$^) | lzop -9 && $(size_append)) > $@
+      cmd_lzo = (cat $(real-prereqs) | lzop -9 && $(size_append)) > $@
 
 quiet_cmd_lz4 = LZ4     $@
-      cmd_lz4 = (cat $(filter-out FORCE,$^) | lz4c -l -c1 stdin stdout && \
+      cmd_lz4 = (cat $(real-prereqs) | lz4c -l -c1 stdin stdout && \
                   $(size_append)) > $@
 
 # U-Boot mkimage
@@ -390,11 +390,11 @@ quiet_cmd_uimage = UIMAGE  $@
 # big dictionary would increase the memory usage too much in the multi-call
 # decompression mode. A BCJ filter isn't used either.
 quiet_cmd_xzkern = XZKERN  $@
-cmd_xzkern = (cat $(filter-out FORCE,$^) | \
+      cmd_xzkern = (cat $(real-prereqs) | \
 	sh $(srctree)/scripts/xz_wrap.sh && $(size_append)) > $@
 
 quiet_cmd_xzmisc = XZMISC  $@
-cmd_xzmisc = (cat $(filter-out FORCE,$^) | \
+      cmd_xzmisc = (cat $(real-prereqs) | \
 	xz --check=crc32 --lzma2=dict=1MiB) > $@
 
 # ASM offsets
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 7d4af0d0..c0b7f52 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -122,7 +122,7 @@ quiet_cmd_ld_ko_o = LD [M]  $@
       cmd_ld_ko_o =                                                     \
 	$(LD) -r $(KBUILD_LDFLAGS)                                      \
                  $(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE)             \
-                 -o $@ $(filter-out FORCE,$^) ;                         \
+                 -o $@ $(real-prereqs) ;                                \
 	$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
 
 $(modules): %.ko :%.o %.mod.o FORCE
-- 
2.7.4


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

* Re: [PATCH 2/3] kbuild: add real-prereqs shorthand for $(filter-out FORCE, $^)
  2019-01-17  4:10 ` [PATCH 2/3] kbuild: add real-prereqs shorthand for $(filter-out FORCE,$^) Masahiro Yamada
@ 2019-01-17  4:22   ` Alexey Kardashevskiy
  2019-01-17  5:59     ` yamada.masahiro
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey Kardashevskiy @ 2019-01-17  4:22 UTC (permalink / raw)
  To: Masahiro Yamada, linux-kbuild
  Cc: Mark Rutland, Mark Greer, linux-kernel, Paul Mackerras,
	H. Peter Anvin, x86, Ingo Molnar, Joel Stanley, James Hogan,
	devicetree, Kees Cook, Nicholas Piggin, Rob Herring,
	Borislav Petkov, Thomas Gleixner, Michal Marek,
	Mauro S. M. Rodrigues, linux-mips, Ralf Baechle, Paul Burton,
	linuxppc-dev



On 17/01/2019 15:10, Masahiro Yamada wrote:
> In Kbuild, if_changed and friends must have FORCE as a prerequisite.
> 
> Hence, $(filter-out FORCE,$^) or $(filter-out $(PHONY),$^) is a common
> pattern to get the names of all the prerequisites except phony targets.
> 
> Add real-prereqs as a shorthand.
> 
> Note:
> We cannot replace $(filter %.o,$^) in cmd_link_multi-m because $^ may
> include auto-generated dependencies from the .*.cmd file when a single
> object module is changed into a multi object module. For details,
> see commit 69ea912fda74 ("kbuild: remove unneeded link_multi_deps").
> I added a comment to avoid accidental breakage.


What is this series made on top of? This does not apply on top of master
from https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git



> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
> 
>  Documentation/devicetree/bindings/Makefile |  2 +-
>  arch/mips/boot/Makefile                    |  2 +-
>  arch/powerpc/boot/Makefile                 |  2 +-
>  arch/x86/realmode/rm/Makefile              |  3 +--
>  scripts/Kbuild.include                     |  4 ++++
>  scripts/Makefile.build                     |  9 ++++++---
>  scripts/Makefile.lib                       | 18 +++++++++---------
>  scripts/Makefile.modpost                   |  2 +-
>  8 files changed, 24 insertions(+), 18 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile
> index 6e5cef0..e4eb5d1 100644
> --- a/Documentation/devicetree/bindings/Makefile
> +++ b/Documentation/devicetree/bindings/Makefile
> @@ -15,7 +15,7 @@ DT_TMP_SCHEMA := processed-schema.yaml
>  extra-y += $(DT_TMP_SCHEMA)
>  
>  quiet_cmd_mk_schema = SCHEMA  $@
> -      cmd_mk_schema = $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) -o $@ $(filter-out FORCE, $^)
> +      cmd_mk_schema = $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) -o $@ $(real-prereqs)
>  
>  DT_DOCS = $(shell cd $(srctree)/$(src) && find * -name '*.yaml')
>  DT_SCHEMA_FILES ?= $(addprefix $(src)/,$(DT_DOCS))
> diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile
> index 35704c2..3ce4dd5 100644
> --- a/arch/mips/boot/Makefile
> +++ b/arch/mips/boot/Makefile
> @@ -115,7 +115,7 @@ endif
>  targets += vmlinux.its.S
>  
>  quiet_cmd_its_cat = CAT     $@
> -      cmd_its_cat = cat $(filter-out $(PHONY), $^) >$@
> +      cmd_its_cat = cat $(real-prereqs) >$@
>  
>  $(obj)/vmlinux.its.S: $(addprefix $(srctree)/arch/mips/$(PLATFORM)/,$(ITS_INPUTS)) FORCE
>  	$(call if_changed,its_cat)
> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
> index 0e8dadd..73d1f35 100644
> --- a/arch/powerpc/boot/Makefile
> +++ b/arch/powerpc/boot/Makefile
> @@ -218,7 +218,7 @@ quiet_cmd_bootas = BOOTAS  $@
>        cmd_bootas = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $<
>  
>  quiet_cmd_bootar = BOOTAR  $@
> -      cmd_bootar = $(BOOTAR) $(BOOTARFLAGS) $@.$$$$ $(filter-out FORCE,$^); mv $@.$$$$ $@
> +      cmd_bootar = $(BOOTAR) $(BOOTARFLAGS) $@.$$$$ $(real-prereqs); mv $@.$$$$ $@
>  
>  $(obj-libfdt): $(obj)/%.o: $(srctree)/scripts/dtc/libfdt/%.c FORCE
>  	$(call if_changed_dep,bootcc)
> diff --git a/arch/x86/realmode/rm/Makefile b/arch/x86/realmode/rm/Makefile
> index 4463fa7..394377c 100644
> --- a/arch/x86/realmode/rm/Makefile
> +++ b/arch/x86/realmode/rm/Makefile
> @@ -37,8 +37,7 @@ REALMODE_OBJS = $(addprefix $(obj)/,$(realmode-y))
>  sed-pasyms := -n -r -e 's/^([0-9a-fA-F]+) [ABCDGRSTVW] (.+)$$/pa_\2 = \2;/p'
>  
>  quiet_cmd_pasyms = PASYMS  $@
> -      cmd_pasyms = $(NM) $(filter-out FORCE,$^) | \
> -		   sed $(sed-pasyms) | sort | uniq > $@
> +      cmd_pasyms = $(NM) $(real-prereqs) | sed $(sed-pasyms) | sort | uniq > $@
>  
>  targets += pasyms.h
>  $(obj)/pasyms.h: $(REALMODE_OBJS) FORCE
> diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
> index 3081603..d93250b 100644
> --- a/scripts/Kbuild.include
> +++ b/scripts/Kbuild.include
> @@ -24,6 +24,10 @@ depfile = $(subst $(comma),_,$(dot-target).d)
>  basetarget = $(basename $(notdir $@))
>  
>  ###
> +# real prerequisites without phony targets
> +real-prereqs = $(filter-out $(PHONY), $^)
> +
> +###
>  # Escape single quote for use in echo statements
>  escsq = $(subst $(squote),'\$(squote)',$1)
>  
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 681ab58..9800178 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -399,8 +399,7 @@ $(sort $(subdir-obj-y)): $(subdir-ym) ;
>  ifdef builtin-target
>  
>  quiet_cmd_ar_builtin = AR      $@
> -      cmd_ar_builtin = rm -f $@; \
> -                     $(AR) rcSTP$(KBUILD_ARFLAGS) $@ $(filter $(real-obj-y), $^)
> +      cmd_ar_builtin = rm -f $@; $(AR) rcSTP$(KBUILD_ARFLAGS) $@ $(real-prereqs)
>  
>  $(builtin-target): $(real-obj-y) FORCE
>  	$(call if_changed,ar_builtin)
> @@ -428,7 +427,7 @@ ifdef lib-target
>  quiet_cmd_link_l_target = AR      $@
>  
>  # lib target archives do get a symbol table and index
> -cmd_link_l_target = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(lib-y)
> +cmd_link_l_target = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs)
>  
>  $(lib-target): $(lib-y) FORCE
>  	$(call if_changed,link_l_target)
> @@ -453,6 +452,10 @@ targets += $(obj)/lib-ksyms.o
>  
>  endif
>  
> +# NOTE:
> +# Do not replace $(filter %.o,^) with $(real-prereqs). When a single object
> +# module is turned into a multi object module, $^ will contain header file
> +# dependencies recorded in the .*.cmd file.
>  quiet_cmd_link_multi-m = LD [M]  $@
>  cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ $(filter %.o,$^) $(cmd_secanalysis)
>  
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index ebaa348..c6fc295 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -231,7 +231,7 @@ $(obj)/%: $(src)/%_shipped
>  # ---------------------------------------------------------------------------
>  
>  quiet_cmd_ld = LD      $@
> -cmd_ld = $(LD) $(ld_flags) $(filter-out FORCE,$^) -o $@
> +      cmd_ld = $(LD) $(ld_flags) $(real-prereqs) -o $@
>  
>  # Objcopy
>  # ---------------------------------------------------------------------------
> @@ -243,7 +243,7 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
>  # ---------------------------------------------------------------------------
>  
>  quiet_cmd_gzip = GZIP    $@
> -      cmd_gzip = cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@
> +      cmd_gzip = cat $(real-prereqs) | gzip -n -f -9 > $@
>  
>  # DTC
>  # ---------------------------------------------------------------------------
> @@ -321,7 +321,7 @@ dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
>  # append the size as a 32-bit littleendian number as gzip does.
>  size_append = printf $(shell						\
>  dec_size=0;								\
> -for F in $(filter-out FORCE,$^); do					\
> +for F in $(real-prereqs); do					\
>  	fsize=$$($(CONFIG_SHELL) $(srctree)/scripts/file-size.sh $$F);	\
>  	dec_size=$$(expr $$dec_size + $$fsize);				\
>  done;									\
> @@ -335,19 +335,19 @@ printf "%08x\n" $$dec_size |						\
>  )
>  
>  quiet_cmd_bzip2 = BZIP2   $@
> -      cmd_bzip2 = (cat $(filter-out FORCE,$^) | bzip2 -9 && $(size_append)) > $@
> +      cmd_bzip2 = (cat $(real-prereqs) | bzip2 -9 && $(size_append)) > $@
>  
>  # Lzma
>  # ---------------------------------------------------------------------------
>  
>  quiet_cmd_lzma = LZMA    $@
> -      cmd_lzma = (cat $(filter-out FORCE,$^) | lzma -9 && $(size_append)) > $@
> +      cmd_lzma = (cat $(real-prereqs) | lzma -9 && $(size_append)) > $@
>  
>  quiet_cmd_lzo = LZO     $@
> -      cmd_lzo = (cat $(filter-out FORCE,$^) | lzop -9 && $(size_append)) > $@
> +      cmd_lzo = (cat $(real-prereqs) | lzop -9 && $(size_append)) > $@
>  
>  quiet_cmd_lz4 = LZ4     $@
> -      cmd_lz4 = (cat $(filter-out FORCE,$^) | lz4c -l -c1 stdin stdout && \
> +      cmd_lz4 = (cat $(real-prereqs) | lz4c -l -c1 stdin stdout && \
>                    $(size_append)) > $@
>  
>  # U-Boot mkimage
> @@ -390,11 +390,11 @@ quiet_cmd_uimage = UIMAGE  $@
>  # big dictionary would increase the memory usage too much in the multi-call
>  # decompression mode. A BCJ filter isn't used either.
>  quiet_cmd_xzkern = XZKERN  $@
> -cmd_xzkern = (cat $(filter-out FORCE,$^) | \
> +      cmd_xzkern = (cat $(real-prereqs) | \
>  	sh $(srctree)/scripts/xz_wrap.sh && $(size_append)) > $@
>  
>  quiet_cmd_xzmisc = XZMISC  $@
> -cmd_xzmisc = (cat $(filter-out FORCE,$^) | \
> +      cmd_xzmisc = (cat $(real-prereqs) | \
>  	xz --check=crc32 --lzma2=dict=1MiB) > $@
>  
>  # ASM offsets
> diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
> index 7d4af0d0..c0b7f52 100644
> --- a/scripts/Makefile.modpost
> +++ b/scripts/Makefile.modpost
> @@ -122,7 +122,7 @@ quiet_cmd_ld_ko_o = LD [M]  $@
>        cmd_ld_ko_o =                                                     \
>  	$(LD) -r $(KBUILD_LDFLAGS)                                      \
>                   $(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE)             \
> -                 -o $@ $(filter-out FORCE,$^) ;                         \
> +                 -o $@ $(real-prereqs) ;                                \
>  	$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
>  
>  $(modules): %.ko :%.o %.mod.o FORCE
> 

-- 
Alexey

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

* RE: [PATCH 2/3] kbuild: add real-prereqs shorthand for $(filter-out FORCE, $^)
  2019-01-17  4:22   ` [PATCH 2/3] kbuild: add real-prereqs shorthand for $(filter-out FORCE, $^) Alexey Kardashevskiy
@ 2019-01-17  5:59     ` yamada.masahiro
  0 siblings, 0 replies; 3+ messages in thread
From: yamada.masahiro @ 2019-01-17  5:59 UTC (permalink / raw)
  To: aik, linux-kbuild
  Cc: mark.rutland, mgreer, linux-kernel, paulus, hpa, x86, mingo,
	joel, jhogan, devicetree, keescook, npiggin, robh+dt, bp, tglx,
	michal.lkml, maurosr, linux-mips, ralf, paul.burton,
	linuxppc-dev

Hi Alexey,

> What is this series made on top of? This does not apply on top of master
> from
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git


If you want to apply this series cleanly, please apply the following first:

https://patchwork.kernel.org/patch/10761625/
https://patchwork.kernel.org/patch/10767193/



The conflicts are not significant.
You can use 'git am -C1' if you want to apply this series
directly to Linus tree.

Masahiro


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

end of thread, other threads:[~2019-01-17  5:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1547698231-20985-1-git-send-email-yamada.masahiro@socionext.com>
2019-01-17  4:10 ` [PATCH 2/3] kbuild: add real-prereqs shorthand for $(filter-out FORCE,$^) Masahiro Yamada
2019-01-17  4:22   ` [PATCH 2/3] kbuild: add real-prereqs shorthand for $(filter-out FORCE, $^) Alexey Kardashevskiy
2019-01-17  5:59     ` yamada.masahiro

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