Re: [PATCH 1/4] kbuild: remove ARCH_POSTLINK from module builds

2023-10-17 Thread Nicolas Schier
ps/Makefile.postlink| 3 --- > arch/powerpc/Makefile.postlink | 3 --- > arch/riscv/Makefile.postlink | 3 --- > arch/x86/Makefile.postlink | 3 --- > scripts/Makefile.modfinal | 5 + > 5 files changed, 1 insertion(+), 16 deletions(-) Reviewed-by: Nicolas Schier

Re: [PATCH] kbuild: Show Kconfig fragments in "help"

2023-08-25 Thread Nicolas Schier
On Thu, Aug 24, 2023 at 03:36:10PM -0700, Kees Cook wrote: > Doing a "make help" would show only hard-coded Kconfig targets and > depended on the archhelp target to include ".config" targets. There was > nothing showing global kernel/configs/ targets. Solve this by walking > the wildcard list and i

Re: [PATCH v2 0/2] kbuild: Show Kconfig fragments in "help"

2023-08-28 Thread Nicolas Schier
On Mon 28 Aug 2023 16:17:07 GMT, Michael Ellerman wrote: > Masahiro Yamada writes: > > On Sat, Aug 26, 2023 at 4:55 AM Kees Cook wrote: > >> > >> Hi, > >> > >> This is my series to show *.config targets in the "help" target so these > >> various topics can be more easily discoverd. > >> > >> v2:

Re: [PATCH] kbuild: single-quote the format string of printf

2023-08-29 Thread Nicolas Schier
On Tue 29 Aug 2023 20:35:31 GMT, Masahiro Yamada wrote: > Use single-quotes to avoid escape sequences (\\n). > > Signed-off-by: Masahiro Yamada > --- Is this really necessary? Testing w/ GNU Make 4.3, bash 5.2.15 or dash 0.5.12-6 and a stupid Makefile snippet I cannot see any difference betwee

Re: [PATCH v2 0/2] kbuild: Show Kconfig fragments in "help"

2023-08-29 Thread Nicolas Schier
On Tue, Aug 29, 2023 at 11:57:19PM +0900 Masahiro Yamada wrote: > On Tue, Aug 29, 2023 at 3:55 PM Nicolas Schier wrote: > > > > On Mon 28 Aug 2023 16:17:07 GMT, Michael Ellerman wrote: > > > Masahiro Yamada writes: > > > > On Sat, Aug 26, 2023 at 4:55 AM Ke

Re: [PATCH v3] kbuild: Show marked Kconfig fragments in "help"

2023-09-02 Thread Nicolas Schier
st > all the fragment targets that have a "# Help: " comment prefix so the > targets can be generated dynamically. > > Add logic to the Makefile to search for and display the fragment and > comment. Add comments to fragments that are intended to be direct targets.

Re: [PATCH v2 RESEND] soc/fsl/qe: fix usb.c build errors

2023-05-31 Thread Nicolas Schier
500.pillnv6r-...@intel.com/ > Suggested-by: Michael Ellerman > Cc: Christophe Leroy > Cc: Leo Li > Cc: Masahiro Yamada > Cc: Nicolas Schier > Cc: Qiang Zhao > Cc: linuxppc-dev > Cc: linux-arm-ker...@lists.infradead.org > Cc: Kumar Gala > --- I can reproduce the

Re: [PATCH 3/5] kbuild: do not print extra logs for V=2

2022-12-23 Thread Nicolas Schier
| 4 ++-- > 5 files changed, 15 insertions(+), 13 deletions(-) > Reviewed-by: Nicolas Schier signature.asc Description: PGP signature

Re: [PATCH v3 01/15] modpost: mitigate false-negatives for static EXPORT_SYMBOL checks

2022-05-05 Thread Nicolas Schier
ule(). > > Please note there are still false positives in the composite module, > like below (or when both are built-in). I have no idea how to do this > correctly. > > [Sample 2] (not fixed by this commit) > > Makefile: > obj-m += mymod.o > mymod-objs :

Re: [PATCH v3 02/15] modpost: change the license of EXPORT_SYMBOL to bool type

2022-05-05 Thread Nicolas Schier
> > > __ksymtab_* is internally by EXPORT_SYMBOL(_GPL) but somebody may > > I mean > "... is internally used by ..." Looks good to me; a nice cleanup. Reviewed-by: Nicolas Schier

Re: [PATCH v3 03/15] modpost: merge add_{intree_flag,retpoline,staging_flag} to add_header

2022-05-05 Thread Nicolas Schier
if (strstarts(mod->name, "drivers/staging")) > buf_printf(b, "\nMODULE_INFO(staging, \"Y\");\n"); > } > > @@ -2544,9 +2536,6 @@ int main(int argc, char **argv) > check_exports(mod); > > add_header(&buf, mod); > - add_intree_flag(&buf, !external_module); > - add_retpoline(&buf); > - add_staging_flag(&buf, mod->name); > add_versions(&buf, mod); > add_depends(&buf, mod); > add_moddevtable(&buf, mod); > -- > 2.32.0 Reviewed-by: Nicolas Schier

Re: [PATCH v3 04/15] modpost: move *.mod.c generation to write_mod_c_files()

2022-05-05 Thread Nicolas Schier
;, fname); > + if (mod->from_dump) > continue; > - } > > - write_if_changed(&buf, fname); > + if (!mod->is_vmlinux) > + write_mod_c_file(mod); > } > > if (missing_namespace_deps) > @@ -2563,7 +2571,5 @@ int main(int argc, char **argv) > warn("suppressed %u unresolved symbol warnings because there > were too many)\n", >nr_unresolved - MAX_UNRESOLVED_REPORTS); > > - free(buf.p); > - > return error_occurred ? 1 : 0; > } > -- > 2.32.0 Reviewed-by: Nicolas Schier

Re: [PATCH v3 07/15] modpost: extract symbol versions from *.cmd files

2022-05-05 Thread Nicolas Schier
ct buffer *b, struct module > *mod) > buf_printf(b, "\nMODULE_INFO(staging, \"Y\");\n"); > } > > +static void check_symversions(struct module *mod) > +{ > + struct symbol *sym; > + > + if (!modversions) > + return; > + > + list_for_each_entry(sym, &mod->exported_symbols, list) { > + if (!sym->crc_valid) { > + warn("EXPORT symbol \"%s\" [%s%s] version generation > failed, symbol will not be versioned.\n" > + "Is \"%s\" prototyped in > ?\n", > + sym->name, mod->name, mod->is_vmlinux ? "" : ".ko", > + sym->name); > + } > + } > +} > + > /** > * Record CRCs for unresolved symbols > **/ > @@ -2429,7 +2508,7 @@ static void read_dump(const char *fname) > } > s = sym_add_exported(symname, mod, gpl_only); > s->is_static = false; > - sym_set_crc(symname, crc); > + sym_set_crc(s, crc); > sym_update_namespace(symname, namespace); > } > free(buf); > @@ -2554,6 +2633,8 @@ int main(int argc, char **argv) > if (mod->from_dump) > continue; > > + check_symversions(mod); > + > if (!mod->is_vmlinux) > write_mod_c_file(mod); > } > -- > 2.32.0 Reviewed-by: Nicolas Schier

Re: [PATCH v3 10/15] genksyms: adjust the output format to modpost

2022-05-05 Thread Nicolas Schier
100644 > --- a/scripts/genksyms/genksyms.c > +++ b/scripts/genksyms/genksyms.c > @@ -680,8 +680,7 @@ void export_symbol(const char *name) > if (flag_dump_defs) > fputs(">\n", debugfile); > > - /* Used as a linker script. */ > - printf("__crc_%s = 0x%08lx;\n", name, crc); > + printf("#SYMVER %s 0x%08lx\n", name, crc); > } > } > > -- > 2.32.0 Reviewed-by: Nicolas Schier

Re: [PATCH v3 09/15] kbuild: stop merging *.symversions

2022-05-05 Thread Nicolas Schier
in ${KBUILD_VMLINUX_OBJS} ${KBUILD_VMLINUX_LIBS}; do > - if [ -f ${o}.symversions ]; then > - cat ${o}.symversions >> .tmp_symversions.lds > - fi > - done > -} > - > # Link of vmlinux.o used for section mismatch analysis >

Re: [PATCH v3 12/15] modpost: simplify the ->is_static initialization

2022-05-05 Thread Nicolas Schier
add_tail(&s->list, &mod->exported_symbols); > hash_add_symbol(s); > @@ -2523,7 +2524,6 @@ static void read_dump(const char *fname) > mod->from_dump = true; > } > s = sym_add_exported(symname, mod, gpl_only); > - s->is_static = false; > sym_set_crc(s, crc); > sym_update_namespace(symname, namespace); > } > -- > 2.32.0 Reviewed-by: Nicolas Schier

Re: [PATCH v3 14/15] kbuild: make built-in.a rule robust against too long argument error

2022-05-05 Thread Nicolas Schier
gt; + cmd_ar_builtin = rm -f $@; \ > + echo $(patsubst $(obj)/%,%,$(real-prereqs)) | \ > + sed -E 's:([^ ]+):$(obj)/\1:g' | \ > + xargs $(AR) cDPrST $@ > > $(obj)/built-in.a: $(real-obj-y) FORCE > $(call if_changed,ar_builtin) > -- > 2.32.0 Reviewed-by: Nicolas Schier

Re: [PATCH v3 15/15] kbuild: make *.mod rule robust against too long argument error

2022-05-05 Thread Nicolas Schier
rch, $*.o, .o, -objs -y > -m)) | \ > - $(AWK) -v RS='( |\n)' '!x[$$0]++' > $@ > +cmd_mod = echo $(call real-search, $*.o, .o, -objs -y -m) | \ > + $(AWK) -v RS='( |\n)' '!x[$$0]++ { print("$(obj)/"$$0) }' > $@ > > $(obj)/%.mod: FORCE > $(call if_changed,mod) > -- > 2.32.0 Thanks! At work, some colleagues of mine stumbled over that problem, too. Reviewed-by: Nicolas Schier

Re: [PATCH] kbuild: Add missing $(objtree) prefix to powerpc crtsavres.o artifact

2025-01-29 Thread Nicolas Schier
S_MODULE += --save-restore-funcs > > else > > -KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o > > +KBUILD_LDFLAGS_MODULE += $(objtree)/arch/powerpc/lib/crtsavres.o > > endif > > ifdef CONFIG_CPU_LITTLE_ENDIAN > > > > --- > > base-commit: ffd294d346d185b70e28b1a28abe367bbfe53c04 > > change-id: 20250127-buildfix-extmod-powerpc-a744e1331f83 Thanks! Reviewed-by: Nicolas Schier Tested-by: Nicolas Schier