All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Bennee <alex@braddahead.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Why do some net drivers require __OPTIMIZE__?
Date: 06 Jan 2003 14:33:29 +0000	[thread overview]
Message-ID: <1041863609.21044.11.camel@cambridge.braddahead> (raw)

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


             reply	other threads:[~2003-01-06 14:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-06 14:33 Alex Bennee [this message]
2003-01-06 15:04 ` Why do some net drivers require __OPTIMIZE__? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1041863609.21044.11.camel@cambridge.braddahead \
    --to=alex@braddahead.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.