public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Why do some net drivers require __OPTIMIZE__?
@ 2003-01-06 14:33 Alex Bennee
  2003-01-06 15:04 ` Richard B. Johnson
  2003-01-06 15:36 ` Alan Cox
  0 siblings, 2 replies; 8+ messages in thread
From: Alex Bennee @ 2003-01-06 14:33 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Hi,

I've been doing a bring up on an embedded kernel and to prevent gdb
making me go google eyed I notched the optimization level down to -O0
for the time being. This broke the natsemi network driver and I noticed
this stanza appears in a few places:

#if !defined(__OPTIMIZE__)
#warning  You must compile this file with the correct options!
#warning  See the last lines of the source file.
#error You must compile this driver with "-O".
#endif

Despite the comments I couldn't see an explanation at the bottom of the
source file and a quick google showed a few patches where this was
removed but no explanation.

Does anybody know the history behind those lines? Do they serve any
purpose now or in the past? Should I be nervous about compiling the
kernel at a *lower* than normal optimization level? After all
optimizations are generally processor specific and shouldn't affect the
meaning of the C.

-- 
Alex Bennee
Senior Hacker, Braddahead Ltd
The above is probably my personal opinion and may not be that of my
employer


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

end of thread, other threads:[~2003-01-07 21:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-06 14:33 Why do some net drivers require __OPTIMIZE__? Alex Bennee
2003-01-06 15:04 ` Richard B. Johnson
2003-01-06 15:45   ` Robert Love
2003-01-06 15:56     ` Richard B. Johnson
2003-01-06 17:48       ` Robert Love
2003-01-06 15:36 ` Alan Cox
2003-01-07 14:33   ` Alex Bennee
2003-01-07 21:58     ` Daniel Jacobowitz

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