[lkml]   [2003]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectWhy do some net drivers require __OPTIMIZE__?

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".

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

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:32    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean