[lkml]   [1996]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRemoval of genksyms warnings in make dep
Hi all!

Since Linus obviously thinks that he will be able to enjoy some German
beer while celebrating Linux-2.0, I thought it is about time we cleaned
up the warnings that genksyms generates on "make depend" for kernels

OK, they _are_ just warnings, but since genksyms attempts to expand
(recursively) the types for every exported symbol (both return value
and parameters) down to the basic types, it actually needs a few more
headers than what the normal compilation does.

The trick is to find _what_ extra files to include.

In linux-1.2 we had achieved the perfect state w.r.t. this, but it
has degenerated a little bit since then...

I can do some of the work if people that use "unusual" modules with
CONFIG_MODVERSIONS could send the outputs from "make depend" to me,
preferably edited so that only the name of the source files and the
name of the affected symbols are shown, together with the corresponding
"gcc ..."-line.
I need the directories of the sources as well, of course...

Since the 2.0-series is intended to be "stable", the benefits of
versioned modules will be easier to see, since the basic structs
and types probably won't change quite as much as they have been,
during the development phase in 1.3.*

As a last resort, we can remove the "-w" option to genksyms, but
that doesn't solve anything, it only hides the warnings...


Bjorn <>

P.S. If anyone wants to look at what is happening, do this:

1. Save the gcc line from "make depend" where the warnings appear.

gcc -D__KERNEL__ -I/u/100/linux/include -Wall -Wstrict-prototypes \
-O2 -fomit-frame-pointer -fno-strength-reduce -pipe -m486 -DCPU=486 \
-E -D__GENKSYMS__ ksyms.c

2. Paste that line into the following script
# Your gcc line here
| /sbin/genksyms -D -w /tmp | grep $1 | awk '
{ for (i = 1; i < NF; ++i) {
if ($i == "{") {
level = level + 1;
printf "%s\n", $i;
for (j = 0; j < level; ++j)
printf " "
else if ($i == "}") {
level = level - 1;
printf "\n"
for (j = 0; j < level; ++j)
printf " "
printf "%s ", $i;
else if ($i == ";") {
printf ";\n"
for (j = 0; j < level; ++j)
printf " "
printf "%s ", $i;
}' -

3. For every symbol in that sourcefile that has a warning, do this:
Example: for the 'do_mmap' warning from kernel/ksyms.c

The_script do_mmap > something_to_think_about

 \ /
  Last update: 2005-03-22 13:37    [W:0.022 / U:6.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site