This sounds a bit like http://www.linuxquestions.org/questions/slackware-14/firefox-segmentation-fault-after-dec-16-2015-a-4175561826/page3.html Maybe it's worth trying to build it with '-Os' instead of '-O2'? -D.