mozilla-firebird's code for optimization is odd. If I have -O2 in my CFLAGS, it gets compiled with -O2, but if I have -O3, it gets compiled with -O. The problem comes from this code: # -O2 and below allowed on 32-bit enable_optimize=$(echo "$CFLAGS" | sed 's/.*\(-O[012]\?\).*/\1/p') enable_optimize=${enable_optimize:--O2} filter-flags -O -O? ;; An example: $ CFLAGS="-f1337foobar -O3 -march=1337-x86"; enable_optimize=$(echo "$CFLAGS" | sed 's/.*\(-O[012]\?\).*/\1/p'); echo $enable_optimize -O -O CFLAGS="-f1337foobar -O2 -march=1337-x86"; enable_optimize=$(echo "$CFLAGS" | sed 's/.*\(-O[012]\?\).*/\1/p'); echo $enable_optimize -O2 -O2 (I have no idea why the -O is doubled - the /p on the regex seems to do this, but my sed regex knowledge isn't advanced). This is easy enough to fix, just add: '; s/-O[3-9]/-O2/' into the first sed command.
Oops, no, I'm wrong, in involves also changing the [012] in the sed line to [0-9] Should -Os be allowed as well?
any reason filter flags arent used ?
thanks, I've fixed this in mozilla-firefox-0.8-r1 (but didn't bother to bump the rev)