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

Matt Jordan reviewboard at asterisk.org
Fri Feb 28 08:32:52 CST 2014



> On Feb. 28, 2014, 8:32 a.m., Matt Jordan wrote:
> > Although I would not expect this to make Asterisk compile under clang, anything above -O3 is superfluous.

And to clarify: I'm fine with this going into 1.8+.


- Matt


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


On Feb. 28, 2014, 12:33 a.m., Tzafrir Cohen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3280/
> -----------------------------------------------------------
> 
> (Updated Feb. 28, 2014, 12:33 a.m.)
> 
> 
> 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/f9d948fb/attachment-0001.html>


More information about the asterisk-dev mailing list