public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* binary compatibity (mixing different gcc versions) in modules
@ 2002-06-17 12:36 Emmanuel Michon
  2002-06-17 13:11 ` Richard B. Johnson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Emmanuel Michon @ 2002-06-17 12:36 UTC (permalink / raw)
  To: linux-kernel

Hi,

looking at nvidia proprietary driver, the makefile warns
the user against insmod'ing a module compiled with a gcc
version different from the one that was used to compile
the kernel.

This sounds strange to me, since I never encountered this
problem.

As a counterpart, what I'm sure of, is that you easily get system
crashes when insmod'ing a module resulting of the linking together 
(with ld -r) of object files (.o) that were not produced by the same gcc.

Can someone give me a clue on what happens?

Everything is compiled with:
cc 
 -O2 
 -DDEBUG=1
 -D__KERNEL__
 -DMODULE 
 -fomit-frame-pointer 
 -fno-strict-aliasing 
 -fno-common 
 -pipe 
 -mpreferred-stack-boundary=2  
 -Wno-import 
 -Wimplicit 
 -Wmain 
 -Wreturn-type 
 -Wswitch 
 -Wtrigraphs 
 -Wchar-subscripts 
 -Wuninitialized 
 -Wparentheses 
 -Wpointer-arith 
 -Wcast-align 
 -fcheck-new

One gcc is 
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)
the other one is 2.95-2.

Would -O1 be a safer choice?

Sincerely yours,

PS. Let's avoid to fall in a open source vs. binary only dialectics
here, it's not really the point ;-)

-- 
Emmanuel Michon
Chef de projet
REALmagic France SAS
Mobile: 0614372733 GPGkeyID: D2997E42  

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-06-18 16:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-17 12:36 binary compatibity (mixing different gcc versions) in modules Emmanuel Michon
2002-06-17 13:11 ` Richard B. Johnson
2002-06-17 21:25   ` J Sloan
2002-06-18  0:24 ` Andi Kleen
2002-06-18 16:11 ` andrew may

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox