kbuild: Use '-f' instead of '--file=' for grep
PATCH 1/1 kbuild: Use '-f' instead of '--file=' for grep
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")
--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
base-commit: 1a2dcbdde82e3a5f1db9b2f4c48aa1aeba534fb2
Makefile +1 -1
@@ -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
Signature · 1 line
2.38.0.135.g90850a2211-goog
PATCH 1/1 kbuild: fix typo in modpost
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.
--- scripts/Makefile.modpost | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
base-commit: 1a2dcbdde82e3a5f1db9b2f4c48aa1aeba534fb2
scripts/Makefile.modpost +1 -1
@@ -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)
Signature · 1 line
2.38.0.135.g90850a2211-goog
Re: [PATCH v1] kbuild: fix typo in modpost
Quoted 8 lines · Will McVicker
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 <[email protected]>
Applied to linux-kbuild/fixes.
Thanks!
Quoted 22 lines
--- scripts/Makefile.modpost | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)base-commit:
1a2dcbdde82e3a5f1db9b2f4c48aa1aeba534fb2scripts/Makefile.modpost +1
-2@@ -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
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 10 lines · Will McVicker
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 updateMakefileto use '-fpattern_file' to fix the compiling error:grep: Unknown option 'file=.../scripts/head-object-list.txt' (see "grep --help")Signed-off-by Will McVicker <[email protected]>
Thanks, but I had already picked up a similar patch.
https://lore.kernel.org/linux-kbuild/[email protected]/
Quoted 22 lines
--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)base-commit:
1a2dcbdde82e3a5f1db9b2f4c48aa1aeba534fb2Makefile +1
-2@@ -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
Signature · 2 lines
Best Regards Masahiro Yamada