[U-Boot] E1000 build warnings

Mike Frysinger vapier at gentoo.org
Fri Nov 4 21:12:00 CET 2011


On Friday 04 November 2011 16:03:09 Moffett, Kyle D wrote:
> On Nov 04, 2011, at 12:47, Wolfgang Denk wrote:
> > you have been modifyong the E1000 driver lately so I hope you are in
> > the best position to help and fix a number of build warnings.
> > 
> > For example when building for the MVBC_P board, I get this:
> > 
> > e1000.c: In function 'e1000_read_mac_addr':
> > e1000.c:1149:2: warning: dereferencing type-punned pointer will break
> > strict-aliasing rules [-Wstrict-aliasing] e1000.c:1149:2: warning:
> > dereferencing type-punned pointer will break strict-aliasing rules
> > [-Wstrict-aliasing]
> 
> Hmm, I would be inclined to just use "-fno-strict-aliasing" and
> "-Wno-strict-aliasing" here.  The Linux kernel does the exact same thing
> because strict-aliasing tends to cause arbitrary breakage with things
> like memcpy() and network protocol buffers.

it's only arbitrary if your code is wrong :)

> Here's one relevant email thread:
>   https://lkml.org/lkml/2003/2/25/270

i don't think that's relevant as that seems to be exercising a specific bug in 
the kernel which we don't have
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111104/df74d432/attachment.pgp 


More information about the U-Boot mailing list