mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: barebox@lists.infradead.org
Cc: Masahiro Yamada <masahiroy@kernel.org>
Subject: [PATCH 2/6] modpost: sync mk_elfconfig.c with Linux 5.7-rc2
Date: Sat, 25 Apr 2020 03:59:20 +0900	[thread overview]
Message-ID: <20200424185924.705754-2-masahiroy@kernel.org> (raw)
In-Reply-To: <20200424185924.705754-1-masahiroy@kernel.org>

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@kernel.org>
---

 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2020-04-24 18:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-24 18:59 [PATCH 1/6] kbuild: remove meaningless headers_check from help target Masahiro Yamada
2020-04-24 18:59 ` Masahiro Yamada [this message]
2020-04-24 18:59 ` [PATCH 3/6] kbuild: swap the include order of arch Makefile and auto.conf.cmd Masahiro Yamada
2020-04-24 18:59 ` [PATCH 4/6] kbuild: make DEFCONFIG_LIST work Masahiro Yamada
2020-04-24 18:59 ` [PATCH 5/6] kbuild: use $(SRCARCH) to point to the arch directory Masahiro Yamada
2020-04-24 18:59 ` [PATCH 6/6] kbuild: set SRCARCH=arm when ARCH=arm64 Masahiro Yamada
2020-04-27  7:56 ` [PATCH 1/6] kbuild: remove meaningless headers_check from help target Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200424185924.705754-2-masahiroy@kernel.org \
    --to=masahiroy@kernel.org \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox