Just get rid of the argument $(ARCH), then hardcode MODULE_SYMBOL_PREFIX. This should have no impact because none of v850, h8300, blackfin is supported by barebox. Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx> --- scripts/mod/Makefile | 2 +- scripts/mod/mk_elfconfig.c | 11 +---------- scripts/mod/modpost.c | 2 ++ 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile index c5aa34892..e02b9f4ce 100644 --- a/scripts/mod/Makefile +++ b/scripts/mod/Makefile @@ -8,7 +8,7 @@ modpost-objs := modpost.o sumversion.o $(obj)/modpost.o $(obj)/file2alias.o $(obj)/sumversion.o: $(obj)/elfconfig.h quiet_cmd_elfconfig = MKELF $@ - cmd_elfconfig = $(obj)/mk_elfconfig $(ARCH) < $< > $@ + cmd_elfconfig = $(obj)/mk_elfconfig < $< > $@ $(obj)/elfconfig.h: $(obj)/empty.o $(obj)/mk_elfconfig FORCE $(call if_changed,elfconfig) diff --git a/scripts/mod/mk_elfconfig.c b/scripts/mod/mk_elfconfig.c index db3881f14..680eade89 100644 --- a/scripts/mod/mk_elfconfig.c +++ b/scripts/mod/mk_elfconfig.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -9,9 +10,6 @@ main(int argc, char **argv) unsigned char ei[EI_NIDENT]; union { short s; char c[2]; } endian_test; - if (argc != 2) { - fprintf(stderr, "Error: no arch\n"); - } if (fread(ei, 1, EI_NIDENT, stdin) != EI_NIDENT) { fprintf(stderr, "Error: input truncated\n"); return 1; @@ -55,12 +53,5 @@ main(int argc, char **argv) else exit(1); - if ((strcmp(argv[1], "v850") == 0) || (strcmp(argv[1], "h8300") == 0) - || (strcmp(argv[1], "blackfin") == 0)) - printf("#define MODULE_SYMBOL_PREFIX \"_\"\n"); - else - printf("#define MODULE_SYMBOL_PREFIX \"\"\n"); - return 0; } - diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 795ee8d09..a42f1e6ce 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -31,6 +31,8 @@ static inline int license_is_gpl_compatible(const char *license) } #endif +#define MODULE_SYMBOL_PREFIX "" + /* Are we using CONFIG_MODVERSIONS? */ int modversions = 0; /* Warn about undefined symbols? (do so if we have vmlinux) */ -- 2.25.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox