lkml.org 
[lkml]   [2000]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.4.0-test[34]: nasty make race with CONFIG_MODVERSIONS=y
I have looked at this before.  I think this is a low-effort correct fix:

(1) Do what you suggest: concatenate include/linux/modversions.h
in only one place, in the top level Makefile, after doing all
the subdirectory "depend" statements.

(2) When compiling source files ("make vmlinux"), go ahead and make
new "%.ver.new" files as needed. But *do not ever* copy these
over the existing "%.ver" files. That leads to races.

(3) Instead, if "%.ver.new" does not compare to "%.ver", then spit
out an error message ("your prototypes have changed; you must run
'make dep' again"). And then "exit 1" and abort the build.

This will change some users' experience from "bad builds with no
message" to "you have to run 'make dep' a lot more". That's an
improvement. My top priority is correctness.

The real fix is to re-design CONFIG_MODVERSIONS so that it does
separate compilation. Right now, if foo.c defines a symbol, and
bar.c uses it, then bar.o depends on bar.c and foo.c. That's
evil and disgusting. bar.o should depend only on bar.c and the
files that bar.c includes (foo.h, not foo.c!).

Michael Elizabeth Chastain
<mailto:mec@shout.net>
"love without fear"

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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