linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] kbuild: Use '-f' instead of '--file=' for grep
@ 2022-10-25 20:17 Will McVicker
  2022-10-25 20:17 ` [PATCH v1] kbuild: fix typo in modpost Will McVicker
  2022-10-27 15:26 ` [PATCH v1] kbuild: Use '-f' instead of '--file=' for grep Masahiro Yamada
  0 siblings, 2 replies; 4+ messages in thread
From: Will McVicker @ 2022-10-25 20:17 UTC (permalink / raw)
  To: Masahiro Yamada, Michal Marek, Nick Desaulniers
  Cc: kernel-team, Will McVicker, linux-kbuild, linux-kernel

The posix grep utility doesn't support the longer '--file=pattern_file'
command line option which was introduced in commit ce697ccee1a8
("kbuild: remove head-y syntax"). Let's update Makefile to use '-f
pattern_file' to fix the compiling error:

  grep: Unknown option 'file=.../scripts/head-object-list.txt'
  (see "grep --help")

Signed-off-by: Will McVicker <willmcvicker@google.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

base-commit: 1a2dcbdde82e3a5f1db9b2f4c48aa1aeba534fb2

diff --git a/Makefile b/Makefile
index d148a55bfd0f..e90bb2b38607 100644
--- a/Makefile
+++ b/Makefile
@@ -1218,7 +1218,7 @@ quiet_cmd_ar_vmlinux.a = AR      $@
       cmd_ar_vmlinux.a = \
 	rm -f $@; \
 	$(AR) cDPrST $@ $(KBUILD_VMLINUX_OBJS); \
-	$(AR) mPiT $$($(AR) t $@ | head -n1) $@ $$($(AR) t $@ | grep -F --file=$(srctree)/scripts/head-object-list.txt)
+	$(AR) mPiT $$($(AR) t $@ | head -n1) $@ $$($(AR) t $@ | grep -F -f $(srctree)/scripts/head-object-list.txt)
 
 targets += vmlinux.a
 vmlinux.a: $(KBUILD_VMLINUX_OBJS) scripts/head-object-list.txt autoksyms_recursive FORCE
-- 
2.38.0.135.g90850a2211-goog


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

* [PATCH v1] kbuild: fix typo in modpost
  2022-10-25 20:17 [PATCH v1] kbuild: Use '-f' instead of '--file=' for grep Will McVicker
@ 2022-10-25 20:17 ` Will McVicker
  2022-10-27 15:22   ` Masahiro Yamada
  2022-10-27 15:26 ` [PATCH v1] kbuild: Use '-f' instead of '--file=' for grep Masahiro Yamada
  1 sibling, 1 reply; 4+ messages in thread
From: Will McVicker @ 2022-10-25 20:17 UTC (permalink / raw)
  To: Masahiro Yamada, Michal Marek, Nick Desaulniers
  Cc: kernel-team, Will McVicker, linux-kbuild, linux-kernel

Commit f73edc8951b2 ("kbuild: unify two modpost invocations") introduced
a typo (moudle.symvers-if-present) which results in the kernel's
Module.symvers to not be included as a prerequisite for
$(KBUILD_EXTMOD)/Module.symvers. Fix the typo to restore the intended
functionality.

Signed-off-by: Will McVicker <willmcvicker@google.com>
---
 scripts/Makefile.modpost | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

base-commit: 1a2dcbdde82e3a5f1db9b2f4c48aa1aeba534fb2

diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 8489a3402eb8..e41dee64d429 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -122,7 +122,7 @@ quiet_cmd_modpost = MODPOST $@
 	sed 's/ko$$/o/' $(or $(modorder-if-needed), /dev/null) | $(MODPOST) $(modpost-args) -T - $(vmlinux.o-if-present)
 
 targets += $(output-symdump)
-$(output-symdump): $(modorder-if-needed) $(vmlinux.o-if-present) $(moudle.symvers-if-present) $(MODPOST) FORCE
+$(output-symdump): $(modorder-if-needed) $(vmlinux.o-if-present) $(module.symvers-if-present) $(MODPOST) FORCE
 	$(call if_changed,modpost)
 
 __modpost: $(output-symdump)
-- 
2.38.0.135.g90850a2211-goog


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

* Re: [PATCH v1] kbuild: fix typo in modpost
  2022-10-25 20:17 ` [PATCH v1] kbuild: fix typo in modpost Will McVicker
@ 2022-10-27 15:22   ` Masahiro Yamada
  0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2022-10-27 15:22 UTC (permalink / raw)
  To: Will McVicker
  Cc: Michal Marek, Nick Desaulniers, kernel-team, linux-kbuild, linux-kernel

On Wed, Oct 26, 2022 at 5:18 AM Will McVicker <willmcvicker@google.com> wrote:
>
> Commit f73edc8951b2 ("kbuild: unify two modpost invocations") introduced
> a typo (moudle.symvers-if-present) which results in the kernel's
> Module.symvers to not be included as a prerequisite for
> $(KBUILD_EXTMOD)/Module.symvers. Fix the typo to restore the intended
> functionality.
>
> Signed-off-by: Will McVicker <willmcvicker@google.com>

Applied to linux-kbuild/fixes.
Thanks!


> ---
>  scripts/Makefile.modpost | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> base-commit: 1a2dcbdde82e3a5f1db9b2f4c48aa1aeba534fb2
>
> diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
> index 8489a3402eb8..e41dee64d429 100644
> --- a/scripts/Makefile.modpost
> +++ b/scripts/Makefile.modpost
> @@ -122,7 +122,7 @@ quiet_cmd_modpost = MODPOST $@
>         sed 's/ko$$/o/' $(or $(modorder-if-needed), /dev/null) | $(MODPOST) $(modpost-args) -T - $(vmlinux.o-if-present)
>
>  targets += $(output-symdump)
> -$(output-symdump): $(modorder-if-needed) $(vmlinux.o-if-present) $(moudle.symvers-if-present) $(MODPOST) FORCE
> +$(output-symdump): $(modorder-if-needed) $(vmlinux.o-if-present) $(module.symvers-if-present) $(MODPOST) FORCE
>         $(call if_changed,modpost)
>
>  __modpost: $(output-symdump)
> --
> 2.38.0.135.g90850a2211-goog
>


-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH v1] kbuild: Use '-f' instead of '--file=' for grep
  2022-10-25 20:17 [PATCH v1] kbuild: Use '-f' instead of '--file=' for grep Will McVicker
  2022-10-25 20:17 ` [PATCH v1] kbuild: fix typo in modpost Will McVicker
@ 2022-10-27 15:26 ` Masahiro Yamada
  1 sibling, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2022-10-27 15:26 UTC (permalink / raw)
  To: Will McVicker
  Cc: Michal Marek, Nick Desaulniers, kernel-team, linux-kbuild, linux-kernel

On Wed, Oct 26, 2022 at 5:18 AM Will McVicker <willmcvicker@google.com> wrote:
>
> The posix grep utility doesn't support the longer '--file=pattern_file'
> command line option which was introduced in commit ce697ccee1a8
> ("kbuild: remove head-y syntax"). Let's update Makefile to use '-f
> pattern_file' to fix the compiling error:
>
>   grep: Unknown option 'file=.../scripts/head-object-list.txt'
>   (see "grep --help")
>
> Signed-off-by: Will McVicker <willmcvicker@google.com>


Thanks, but I had already picked up a similar patch.


https://lore.kernel.org/linux-kbuild/20221017150113.334571-1-newbie13xd@gmail.com/



> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> base-commit: 1a2dcbdde82e3a5f1db9b2f4c48aa1aeba534fb2
>
> diff --git a/Makefile b/Makefile
> index d148a55bfd0f..e90bb2b38607 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1218,7 +1218,7 @@ quiet_cmd_ar_vmlinux.a = AR      $@
>        cmd_ar_vmlinux.a = \
>         rm -f $@; \
>         $(AR) cDPrST $@ $(KBUILD_VMLINUX_OBJS); \
> -       $(AR) mPiT $$($(AR) t $@ | head -n1) $@ $$($(AR) t $@ | grep -F --file=$(srctree)/scripts/head-object-list.txt)
> +       $(AR) mPiT $$($(AR) t $@ | head -n1) $@ $$($(AR) t $@ | grep -F -f $(srctree)/scripts/head-object-list.txt)
>
>  targets += vmlinux.a
>  vmlinux.a: $(KBUILD_VMLINUX_OBJS) scripts/head-object-list.txt autoksyms_recursive FORCE
> --
> 2.38.0.135.g90850a2211-goog
>


-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2022-10-27 15:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-25 20:17 [PATCH v1] kbuild: Use '-f' instead of '--file=' for grep Will McVicker
2022-10-25 20:17 ` [PATCH v1] kbuild: fix typo in modpost Will McVicker
2022-10-27 15:22   ` Masahiro Yamada
2022-10-27 15:26 ` [PATCH v1] kbuild: Use '-f' instead of '--file=' for grep Masahiro Yamada

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