Re: modutils check for SMP

Michael Elizabeth Chastain (mec@shout.net)
Mon, 30 Aug 1999 19:58:50 -0500


Hi Steve,

> Compiler version mismatch: spinlock_t gets defined differently for gcc 2.7
> on UP ia32, which alters the sizes of all the structures that contain one.

So, the source files examine the gcc version number and generate different
spinlock_t structures depending on the value of __GNUC__ and __GNUC_MINOR__.

Rules.make runs each source file through cpp and hands it to genksyms, so
genksyms ought to get the appropriate structure for the compiler in use.
I believe that genksyms will do its job correctly here and generate the
appropriate signature for each compiler. So I believe kernels built
with one compiler will reject modules built with the other compiler,
as they should.

I haven't tested this, but if someone wants to come up with a test case
that proves me wrong, I'd be interested (not like I have any time to *do*
anything about it this month).

And personally, I would rather change asm/*/spinlock.h to use one
structure all the time, and upgrade the structure definition about a
year after the date Linus changes his official compiler recommendation.

Michael Elizabeth Chastain "yes, I feel very strongly
<mailto:mec@shout.net> of stable binary interfaces"
"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/