From: Sam Ravnborg <sam@ravnborg.org>
To: lkml <linux-kernel@vger.kernel.org>
Cc: Sam Ravnborg <sam@mars.ravnborg.org>, Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH 39/46] kbuild: fix genksyms build error
Date: Tue, 21 Mar 2006 17:20:57 +0100 [thread overview]
Message-ID: <1142958057756-git-send-email-sam@ravnborg.org> (raw)
In-Reply-To: <11429580572017-git-send-email-sam@ravnborg.org>
genksyms needs to know when a symbol must have a "_" prefex as is
true for a few architectures.
Pass $(ARCH) as commandline argument and hardcode what architectures that
needs this info.
Previous attemt to take it from elfconfig.h was br0ken since elfconfig.h
is a generated file.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
scripts/Makefile.build | 2 +-
scripts/genksyms/genksyms.c | 17 ++++++++++++-----
2 files changed, 13 insertions(+), 6 deletions(-)
c79c7b0923ff353d12194e83628bcca5a8606564
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 7afe3e7..19ef2bc 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -166,7 +166,7 @@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D
cmd_modversions = \
if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \
$(CPP) -D__GENKSYMS__ $(c_flags) $< \
- | $(GENKSYMS) \
+ | $(GENKSYMS) -a $(ARCH) \
> $(@D)/.tmp_$(@F:.o=.ver); \
\
$(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \
diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c
index ef8822e..da8ff4f 100644
--- a/scripts/genksyms/genksyms.c
+++ b/scripts/genksyms/genksyms.c
@@ -32,7 +32,6 @@
#endif /* __GNU_LIBRARY__ */
#include "genksyms.h"
-#include "../mod/elfconfig.h"
/*----------------------------------------------------------------------*/
#define HASH_BUCKETS 4096
@@ -44,6 +43,8 @@ int cur_line = 1;
char *cur_filename, *output_directory;
int flag_debug, flag_dump_defs, flag_warnings;
+const char *arch = "";
+const char *mod_prefix = "";
static int errors;
static int nsyms;
@@ -458,7 +459,7 @@ export_symbol(const char *name)
fputs(">\n", debugfile);
/* Used as a linker script. */
- printf("%s__crc_%s = 0x%08lx ;\n", MODULE_SYMBOL_PREFIX, name, crc);
+ printf("%s__crc_%s = 0x%08lx ;\n", mod_prefix, name, crc);
}
}
@@ -529,6 +530,7 @@ main(int argc, char **argv)
#ifdef __GNU_LIBRARY__
struct option long_opts[] = {
+ {"arch", 1, 0, 'a'},
{"debug", 0, 0, 'd'},
{"warnings", 0, 0, 'w'},
{"quiet", 0, 0, 'q'},
@@ -538,13 +540,16 @@ main(int argc, char **argv)
{0, 0, 0, 0}
};
- while ((o = getopt_long(argc, argv, "dwqVDk:p:",
+ while ((o = getopt_long(argc, argv, "a:dwqVDk:p:",
&long_opts[0], NULL)) != EOF)
#else /* __GNU_LIBRARY__ */
- while ((o = getopt(argc, argv, "dwqVDk:p:")) != EOF)
+ while ((o = getopt(argc, argv, "a:dwqVDk:p:")) != EOF)
#endif /* __GNU_LIBRARY__ */
switch (o)
{
+ case 'a':
+ arch = optarg;
+ break;
case 'd':
flag_debug++;
break;
@@ -567,7 +572,9 @@ main(int argc, char **argv)
genksyms_usage();
return 1;
}
-
+ if ((strcmp(arch, "v850") == 0) ||
+ (strcmp(arch, "h8300") == 0))
+ mod_prefix = "_";
{
extern int yydebug;
extern int yy_flex_debug;
--
1.0.GIT
next prev parent reply other threads:[~2006-03-21 16:21 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <11429580554104-git-send-email-sam@ravnborg.org>
2006-03-21 16:20 ` [PATCH 22/46] kbuild: do not warn when unwind sections references .init/.exit sections Sam Ravnborg
2006-03-21 16:20 ` [PATCH 23/46] kbuild: version.h should depend on .kernelrelease Sam Ravnborg
2006-03-21 16:20 ` [PATCH 24/46] kbuild: Add copyright to modpost.c Sam Ravnborg
2006-03-21 16:20 ` [PATCH 25/46] kbuild: ignore all generated files for make allmodconfig (x86_64) Sam Ravnborg
2006-03-21 16:20 ` [PATCH 26/46] kbuild: whitelist false section mismatch warnings Sam Ravnborg
2006-03-21 16:20 ` [PATCH 27/46] kbuild: make namespace.pl CROSS_COMPILE happy Sam Ravnborg
2006-03-21 16:20 ` [PATCH 28/46] kbuild: small update of allnoconfig description Sam Ravnborg
2006-03-21 16:20 ` [PATCH 29/46] kbuild: kill trailing whitespace in modpost & friends Sam Ravnborg
2006-03-21 16:20 ` [PATCH 30/46] kbuild: kill false positives from section mismatch warnings for powerpc Sam Ravnborg
2006-03-21 16:20 ` [PATCH 31/46] kbuild: fix section mismatch check for unwind on IA64 Sam Ravnborg
2006-03-21 16:20 ` [PATCH 32/46] kbuild: in the section mismatch check try harder to find symbols Sam Ravnborg
2006-03-21 16:20 ` [PATCH 33/46] kbuild: fix make dir/file.xx when asm symlink is missing Sam Ravnborg
2006-03-21 16:20 ` [PATCH 34/46] kbuild: when warning symbols exported twice now tell user this is the problem Sam Ravnborg
2006-03-21 16:20 ` [PATCH 35/46] kbuild: change kbuild to not rely on incorrect GNU make behavior Sam Ravnborg
2006-03-21 16:20 ` [PATCH 36/46] kbuild: Fix bug in crc symbol generating of kernel and modules Sam Ravnborg
2006-03-21 16:20 ` [PATCH 37/46] kbuild: replace PHONY with FORCE Sam Ravnborg
2006-03-21 16:20 ` [PATCH 38/46] kbuild: in makefile.txt note that Makefile is preferred name for kbuild files Sam Ravnborg
2006-03-21 16:20 ` Sam Ravnborg [this message]
2006-03-21 16:20 ` [PATCH 40/46] kbuild: Lindent genksyms.c Sam Ravnborg
2006-03-21 16:20 ` [PATCH 41/46] kbuild: clean-up genksyms Sam Ravnborg
2006-03-21 16:20 ` [PATCH 42/46] kbuild: add -fverbose-asm to i386 Makefile Sam Ravnborg
2006-03-21 16:20 ` [PATCH 43/46] Kconfig: remove the CONFIG_CC_ALIGN_* options Sam Ravnborg
2006-03-21 16:20 ` [PATCH 44/46] kconfig: fix time ordering of writes to .kconfig.d and include/linux/autoconf.h Sam Ravnborg
2006-03-21 16:20 ` [PATCH 45/46] kbuild: fix make help & make *pkg Sam Ravnborg
2006-03-21 16:20 ` [PATCH 46/46] kbuild: remove obsoleted scripts/reference_* files Sam Ravnborg
2006-03-21 17:28 ` [PATCH 35/46] kbuild: change kbuild to not rely on incorrect GNU make behavior Jan-Benedict Glaw
2006-03-21 17:37 ` Paul D. Smith
2006-03-21 17:53 ` Sam Ravnborg
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=1142958057756-git-send-email-sam@ravnborg.org \
--to=sam@ravnborg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@mars.ravnborg.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