From: Sam Ravnborg <sam@ravnborg.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: [PATCH] kbuild: fix genksyms build error
Date: Sun, 12 Mar 2006 15:29:41 +0100 [thread overview]
Message-ID: <20060312142941.GA26471@mars.ravnborg.org> (raw)
In-Reply-To: <200603121416.26583.rjw@sisk.pl>
On Sun, Mar 12, 2006 at 02:16:26PM +0100, Rafael J. Wysocki wrote:
> On Sunday 12 March 2006 12:10, Andrew Morton wrote:
> >
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc6/2.6.16-rc6-mm1/
>
> Doesn't compile for me:
>
> rafael@albercik:~/src/mm/linux-2.6.16-rc6-mm1> make
> CHK include/linux/version.h
> SPLIT include/linux/autoconf.h -> include/config/*
> HOSTCC scripts/genksyms/genksyms.o
> scripts/genksyms/genksyms.c:35:30: error: ../mod/elfconfig.h: No such file or directory
It a stupid dependency on a generated file.
The file only gets generated upon a successfull 'make modules', whereas
genksyms is used for every file compiled as a module.
The workaround is to do:
disable CONFIG_MODVERSIONS
make modules
enable CONFIG_MODVERSIONS
make
We could eventually fetch definition from <asm/module.h> but that seems
to drag all other stuff in.
So fix is instead to hardcode the check for the two relevant
architectures direct in genksyms.
Is genksyms used outside the kernel?
Sam
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;
next prev parent reply other threads:[~2006-03-12 14:30 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-12 11:10 2.6.16-rc6-mm1 Andrew Morton
2006-03-12 13:16 ` 2.6.16-rc6-mm1 Rafael J. Wysocki
2006-03-12 13:35 ` 2.6.16-rc6-mm1 Sam Ravnborg
2006-03-12 13:49 ` 2.6.16-rc6-mm1 Rafael J. Wysocki
2006-03-12 14:29 ` Sam Ravnborg [this message]
2006-03-12 15:46 ` 2.6.16-rc6-mm1 Benoit Boissinot
2006-03-12 15:48 ` 2.6.16-rc6-mm1 Benoit Boissinot
2006-03-12 15:55 ` 2.6.16-rc6-mm1 Benoit Boissinot
2006-03-12 18:45 ` 2.6.16-rc6-mm1: BUG at fs/sysfs/inode.c:180 Laurent Riffard
2006-03-12 22:55 ` Alexey Dobriyan
2006-03-12 23:33 ` Laurent Riffard
2006-03-12 23:01 ` Andrew Morton
2006-03-13 14:00 ` Maneesh Soni
2006-03-13 17:04 ` Laurent Riffard
2006-03-13 19:22 ` Greg KH
2006-03-14 3:23 ` Maneesh Soni
2006-03-12 21:43 ` BUG: atomic counter underflow [Was: 2.6.16-rc6-mm1] Jiri Slaby
2006-03-13 3:35 ` Ian Kent
2006-03-13 5:33 ` Ian Kent
2006-03-17 16:47 ` Jiri Slaby
2006-03-17 17:47 ` Jiri Slaby
2006-03-19 1:06 ` Jiri Slaby
2006-03-19 1:19 ` Jiri Slaby
2006-03-23 11:44 ` Ian Kent
2006-03-12 21:47 ` 2.6.16-rc6-mm1 Grant Coady
2006-03-13 3:18 ` 2.6.16-rc6-mm1 James Morris
2006-03-13 4:39 ` 2.6.16-rc6-mm1 (NFS tree ... busy inodes ... relatively harmless) Neil Brown
2006-03-13 4:47 ` Andrew Morton
2006-03-13 21:14 ` [-mm patch] sound/pci/ice1712/delta.c: make 2 functions static Adrian Bunk
2006-03-14 11:16 ` Takashi Iwai
2006-03-13 21:16 ` [RFC: -mm patch] remove drivers/message/fusion/mptscsih.c:mptscsih_setDevicePage1Flags() Adrian Bunk
2006-03-13 21:19 ` [RFC: -mm patch] fs/nfsd/export.c,net/sunrpc/cache.c: make needlessly global code static Adrian Bunk
2006-03-13 21:21 ` [RFC: -mm patch] remove drivers/scsi/constants.c:scsi_print_req_sense() Adrian Bunk
2006-03-13 21:26 ` [-mm patch] make drivers/net/tg3.c:tg3_request_irq() Adrian Bunk
2006-03-15 1:04 ` David S. Miller
2006-03-13 21:28 ` [-mm patch] dvb/frontends/zl10353.c: make a function static Adrian Bunk
2006-03-15 7:41 ` 2.6.16-rc6-mm1 Nishanth Aravamudan
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=20060312142941.GA26471@mars.ravnborg.org \
--to=sam@ravnborg.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
/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
Powered by JetHome