[ELDK] ELDK 5.1.1: GCC 4.6.1 optimization settings generating invalid computation order/results.

Patrick O'Halloran pohalloran at gmail.com
Thu Mar 15 13:54:56 CET 2012


Hi Wolfgang,

Thanks for the follow-up. I'll gather the information you requested, and
also go through the build process (in case this is an outstanding issue).
It'll take a few days to gather the relevant information. But will do so
ASAP.
I also have an email drafted to submit to the GCC mailing list for
additional input.
Best Regards,
Patrick


On Thu, Mar 15, 2012 at 4:59 AM, Wolfgang Denk <wd at denx.de> wrote:

> Dear Patrick,
>
> In message <CAJV+WJ1E_cpARTbX1P1DFWHe8bRJrYyjopMpBZfmrj0s1d=
> 24w at mail.gmail.com> you wrote:
> >
> > We have been working with your ELDK 5.1.1 toolchain (powerpc-4xx) for
> some
> > weeks now, and had noticed inconsistent behavior between our old firmware
> > image (generated with ELDK 4.1) and new firmware image (generated with
> ELDK
> > 5.1.1).
> > Specifically we were seeing inconsistent results from one particular code
> > block which was doing quite a bit of bit manipulation.
>
> Can you share a minimal piece of code that shows the problem?
>
> Do you see any compiler warnings for this code when building with
> "-Wall -pedantic" ?
>
> Did you consider reporting this on the GCC mailing list?
>
> > We are advising internally in our development group that the following
> > flags be added to CFLAGS when building any code with the ELDK 5.1.1
> >     OPP_FLAG_SETTINGS = -fno-tree-ccp -fno-tree-bit-ccp
>
> I really would like to see the difference in the generated code
> between ELDk 4.1, 4.2, 5.0 and 5.1 (with and withoutt hese options).
> So it would really be helful if you could provide a minimal example of
> code that shows this.
>
> > Don't know if this is related to the following:
> >
> >    - http://comments.gmane.org/gmane.comp.gcc.bugs/338704
> >    - http://comments.gmane.org/gmane.comp.gcc.bugs/304411
>
> Hm... I can't tell for sure, but at first glance t doesn't look so. At
> least the symptoms are different: the bugs referenced here result
> either in a SIGSEGV crash, or in an "internal compiler error" abort,
> but not in generation of incorrect code.
>
> > This is our current workaround, and planned development path. However, we
> > wanted to know if you had seen similar issues, or know of other means of
> > configuring GCC to use this as default behavior rather than adding to
> flags
> > to each makefile/build scripts.
>
> I was / am not aware of any such issues.
>
> If you want to change the default settings of GCC, you can change it's
> configuration in the build scripts
> ("meta/recipes-devtools/gcc/gcc-configure-common.inc") and rebuild
> everything.
>
> > Also, how are the prebuilt images built (glibc, gdb, etc) i.e. assuming
> > some optimization level enabled.
>
> Yes, indeed these are built with optimization enabled.
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> The human race is a race of cowards; and I am not  only  marching  in
> that procession but carrying a banner.                   - Mark Twain
>


More information about the eldk mailing list