FYI: gcc optimization bug affecting volatile accesses

Lluís Batlle i Rossell viric at viric.name
Sat Jan 26 18:54:21 EST 2013


On Sun, Jan 27, 2013 at 12:47:20AM +0100, David Kuehling wrote:
> >>>>> "Werner" == Werner Almesberger <werner at almesberger.net> writes:
> 
> > Llu?s Batlle i Rossell wrote:
> >> That reminds me that any gcc below 4.7.2 has been considered 'very
> >> buggy' for the job of building a mips kernel properly. mips-related
> >> bugs.
> 
> > Hmm, as in 4.6.3 < 4.7.2 ? That would be scary. Our OpenWRT toolchain,
> > which is what most Ben kernels are built with, uses 4.6.3.
> 
> Maybe for some reasons those bugs don't hit with -Os instead of -O2?  I
> noticed that none of my -O2 optimized kernels boot on my Fuloong 6004,
> while -Os usually works.  But this could also be a pmon (bootloader)
> bug.

I also had some troubles with a fuloong. I don't know about yours, but my PMON
has troubles if the kernel is bigger than some dumb size (2.4MB? 4MB? I can't
remember), because kernel+that_size is the load address of initrd images.

Just in case you hit that thing. :)

And I've seen my kernel images sometimes work sometimes not. Quite weird, maybe
related to the compiler.



More information about the discussion mailing list


interactive