[asterisk-dev] [Code Review] 3280: Makefile: replace -O6 with -O3

Tzafrir Cohen reviewboard at asterisk.org
Mon Mar 3 19:04:12 CST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3280/
-----------------------------------------------------------

(Updated March 3, 2014, 7:04 p.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Repository: Asterisk


Description
-------

Asterisk's build system sets -O6 as the CPU optimization flag. I believe this was copied at some point from old Linux kernel build command and never changed since.

The C standard does not give a valid meaning to anything above -O3. gcc simply considers it as -O3. clang rejects it as it is an invalid value. Thus the proposed change should result with no changes to building with gcc, but help building Asterisk with clang. As it is a bug-fix, it should probably be applied to all supported branches.

That said, a saner value would probably be -O2, perhaps with some extra specific optimization flags.

Workaround for "applying" this fix manually: build with OPTIMIZE=-O3


Diffs
-----

  /trunk/Makefile.rules 409155 

Diff: https://reviewboard.asterisk.org/r/3280/diff/


Testing
-------


Thanks,

Tzafrir Cohen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140304/033dca74/attachment.html>


More information about the asterisk-dev mailing list