-ffast-math scrambles xulrunner

My previous difficulties with compiling Firefox 3 were because of the -ffast-math CFLAG, which was causing xulrunner to go nutty. Strange add-on messages, faulty form boxes and corrupted images, if you want to know how the patient presented himself.

I rebuilt firefox and xulrunner separately several times, with and without -ffast-math, with and without -O3, and with and without -Os, just for experimentation purposes. -ffast-math caused xulrunner to misbehave every time, regardless of the optimization level.

firefox itself was fine no matter what flags I used. And other ancillary packages seem to behave normally too. As far as -Os making programs load faster or run quicker, I don’t notice anything substantially different over -O2. Since it’s slightly more convenient not to have to switch flags for one package, I might stick with -Os -pipe -fomit-frame-pointer, and call it as good as it gets.

About these ads

2 Responses to “-ffast-math scrambles xulrunner”

  1. 1 xabbott 2008/08/02 at 11:47 AM

    I find, in general, compiling Firefox with one set of flags ends up performing worse than the binary they release.

  2. 2 Peterix 2008/08/02 at 9:18 PM

    That’s because they compile it twice. First they make a profiling build, run that for a while (click some buttons, browse a bit, run benchmarks, etc.) and then use the collected data to optimize the second build.

    It’s called Profile Guided Optimization (PGO).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Visit the Wiki!

Some recent desktops

May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF

May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games

Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers


This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,958,871 hits



Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: