[lkml]   [2003]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Why do some net drivers require __OPTIMIZE__?
On Mon, 2003-01-06 at 15:36, Alan Cox wrote:
> > 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.
> Some of our inline and asm blocks assume things like optimisation. Killing
> that check and adding -finline-functions ought to be enough to get what
> you expect.

It appears to go deeper than a few network drivers. Droping to -O0
breaks a host of other sections (ipc, sockets etc.) for less than
obvious reasons. The only source files that seem to depend on the
__OPTIMIZE__ define are a few of the other drivers and the byteswap

I'll investigate the gcc pages to see if there is anyway to allow
optimisation without the out-of-order stuff that makes tracing the start
up so hard. *sigh*

I assume I can't drop the -fomit-frame-pointer for the same reason
(inline and asm blocks assuming register assigment?).

On a related note should enabling -g on the kernel CFLAGS be ok? For
some reason vmlinux kernels compiled with -g (even after being stripped)
seem to break the bootmem allocator on my setup. I'm trying to track
down if this is due to some linker weirdness due to the symbol table
being bigger than physical memory even though its not actually being
loaded into the system.

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    [W:0.106 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site