Re: linux-next: net tree build failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 23 Jan 2009 21:39:27 +1100 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
>
> Hi again,
> 
> On Fri, 23 Jan 2009 21:21:28 +1100 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
> >
> > So, this could be a compiler bug?
> 
> We pass -fno-common to gcc which seems to cause the (non-extern) const
> variable to end up in the bss.

       -fno-common
           In C, allocate even uninitialized global variables in the data
           section of the object file, rather than generating them as common
           blocks.  This has the effect that if the same variable is declared
           (without "extern") in two different compilations, you will get an
           error when you link them.  The only reason this might be useful is
           if you wish to verify that the program will work on other systems
           which always work this way.

I don't know why we use this, but it seems to basically make using
"extern" on variables in header files compulsory.  But it seems to be
moving the variable from *COM* to .bss rather than to .{ro}data as I would
expect from the description above.

Oh, well, easy to work around.
-- 
Cheers,
Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx
http://www.canb.auug.org.au/~sfr/

Attachment: pgpP3HJg8dVo5.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux