[haiku-development] Re: Segmentation fault building jam on FreeBSD 9.0

  • From: Joseph Prostko <joe.prostko@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 13 Aug 2012 16:35:37 -0400

On Mon, Aug 13, 2012 at 4:05 PM, Urias McCullough <umccullough@xxxxxxxxx> wrote:
> On Mon, Aug 13, 2012 at 1:02 PM, Joseph Prostko <joe.prostko@xxxxxxxxx> wrote:
>> particular issue.  Another option would be changing the -O3 to -O (aka
>> -O1), but doing that you would lose 30 optimizations from -O2 and -O3,
>> compared to just one optimization.
>
> FWIW, as pointed out by mmadia in IRC, the Jambase file already uses
> -O for building jam via jam...

Indeed, he is correct.  I suppose I should have went digging there
first to see what it was doing.  :)

The line mentioned is here:

http://cgit.haiku-os.org/buildtools/tree/jam/Jambase#n543

> So, once you've compiled the jam0 stub, and use it to build/install
> the real jam, you've already lost those optimizations.

Very true.

> Whether we could/should add them back to the Jamfiles is an entirely
> different discussion I suppose.

Yeah, I think for consistency, either we should use -O in both places,
or else -O3 -fno-strict-aliasing.  I suppose the easier fix is to do
-O, but then again, it kind of covers up the fact as to what is
actually wrong.  Doing that also eliminates optimizations that may or
may not matter in any noticeable way.  Either solution works for me
though at the end of the day.

- joe

Other related posts: