[asterisk-dev] [Code Review] 3664: build: Disable AST_FORTIFY_SOURCE if DONT_OPTIMIZE is selected.

George Joseph reviewboard at asterisk.org
Sat Jun 21 14:48:40 CDT 2014


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

Review request for Asterisk Developers.


Repository: Asterisk


Description
-------

AST_FORTIFY_SOURCE is automatically set in ./Makefile even if DONT_OPTIMIZE is set in menuselect.  This causes gcc to complain that _FORTIFY_SOURCE requires optimization.  You can specify "make AST_FORTIFY_SOURCE=''" but I always forget.

This patch moves the set of AST_FORTIFY_SOURCE to Makefile.rules and only sets it if DONT_OPTIMIZE is "no".  The move is necessary because the top-level Makefile doesn't include menuselect.makeopts.

This doesn't solve the entire problem however because res_config_mysql seems to force _FORTIFY_SOURCE so res_config_mysql has to be disabled for now if DONT_OPTIMIZE is set.  


Diffs
-----

  branches/12/Makefile.rules 416992 
  branches/12/Makefile 416992 

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


Testing
-------

Tested compile both with and without the optimize flag set and insured that the proper combination of _FORTIFY_SOURCE and -O were set.


Thanks,

George Joseph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140621/31da9942/attachment.html>


More information about the asterisk-dev mailing list