[asterisk-dev] [Code Review] 3280: Makefile: replace -O6 with -O3
Tzafrir Cohen
reviewboard at asterisk.org
Fri Feb 28 00:33:20 CST 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3280/
-----------------------------------------------------------
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/20140228/4a2ba079/attachment-0001.html>
More information about the asterisk-dev
mailing list