]> git.ipfire.org Git - thirdparty/asterisk.git/commit
build: Turn FORTIFY_SOURCE off if DONT_OPTIMIZE is set.
authorGeorge Joseph <george.joseph@fairview5.com>
Sun, 22 Jun 2014 20:52:19 +0000 (20:52 +0000)
committerGeorge Joseph <george.joseph@fairview5.com>
Sun, 22 Jun 2014 20:52:19 +0000 (20:52 +0000)
commitc7e9233a814c1a2fd335a035b59e8d5f64a4eb9a
treea6a87bee8c0b06c34f2377395c98d0f510c9fdfc
parent2b4423d2b3d908439e8749595a983c49f910072a
build:  Turn FORTIFY_SOURCE off if DONT_OPTIMIZE is set.

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 and the build will fail.  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.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3664/
........

Merged revisions 417016 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@417017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Makefile
Makefile.rules