On Fri, Nov 18, 2011 at 07:19:52AM +0100, Wolfgang Denk wrote:
> Dear Marek Vasut,
> 
> In message <201111180601.20086.marek.va...@gmail.com> you wrote:
> >
> > > >         When I make using the following:
> > > >     make CROSS_COMPILE=ppc_85xx- sbc8548_PCI_33_PCIE_config
> > > >     make CROSS_COMPILE=ppc_85xx- OPTFLAGS=-O2 all
> > > >     
> > > >     I am still having the same undefined reference above.
> > > >     
> > > >     Should I be building with ppc_8xx instead?  If yes, why?
> > > >         
> > > >         Thanks,
> > > 
> > > This appears to be due to you trying to build with OPTFLAGS=-O2.  Remove
> > > that and see what happens.
> > > 
> > 
> > That seems to be a bug in the compiler, if you want -O2, try ELDK5.1 (which 
> > has 
> > newer compiler).
> 
> No.  He is using CROSS_COMPILE=ppc_85xx- which means ELDK 4.2 or
> similar.  And there is no such compiler problem with any of these.
> The "-O2" is just inappropriate here.

Regardless of "appropriateness", it shouldn't break with -O2 other than
possibly not meeting space constraints.

arch/powerpc/cpu/mpc8xxx/ddr/main.c references fsl_ddr_get_dimm_params()
when CONFIG_DDR_SPD and CONFIG_SPD_EEPROM are unset (both are unset on
sbc8548).  sbc8548 board code does not supply this function.  The code is
broken.  It builds with some toolchains because it seems that nothing in
arch/powerpc/cpu/mpc8xxx/ddr/main.c is ever referenced on this board, so
it all gets gc-sectioned away.  Apparently for some reason that isn't
happening properly with -O2 on some toolchains -- but it's not something
we should be relying on for anything other than size optimization.

-Scott

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to