[haiku-development] Re: Disabling Strict Aliasing for GCC4 Builds

  • From: "Michael Lotz" <mmlr@xxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 17 Apr 2008 22:57:41 +0200

Hi Rene

> I actually wonder if this could be part of the explanation as to why
> gcc4 builds are incredibly unstable on my hardware (read: guaranteed
> KDL in a random location after 10 minutes max), while gcc2 builds run
> flawlessly. Would be interesting to see if that flag helps.

Yes that's one of the things I thought might be related. I have built 
two images by the way (with GCC4 under BeOS) one normal and one with "-
fno-strict-aliasing". Both worked, both had some crashes in strlen() 
and related functions and with both (only testing under QEMU) I 
couldn't reproduce any of the GCC4 related bugs. The only thing 
different I could find is that Chart refused to draw anything with the 
normal image but worked as expected with "-fno-strict-aliasing". As 
those are optimization problems though it is likely that they are 
dependant on the CPU, i.e. SMP or just speed. So Rene you could try to 
apply the patch and then rebuild. You'll have to delete the objects dir 
or use "jam -a" though to get the effect I suppose.

Regards
Michael

Other related posts: