[svn-commits] gtjoseph: branch 11 r417017 - in /branches/11: ./ Makefile Makefile.rules

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Jun 22 15:52:23 CDT 2014


Author: gtjoseph
Date: Sun Jun 22 15:52:19 2014
New Revision: 417017

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=417017
Log:
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

Modified:
    branches/11/   (props changed)
    branches/11/Makefile
    branches/11/Makefile.rules

Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/11/Makefile
URL: http://svnview.digium.com/svn/asterisk/branches/11/Makefile?view=diff&rev=417017&r1=417016&r2=417017
==============================================================================
--- branches/11/Makefile (original)
+++ branches/11/Makefile Sun Jun 22 15:52:19 2014
@@ -186,7 +186,6 @@
   _ASTCFLAGS+=-Werror
   _ASTCFLAGS+=-Wunused
   _ASTCFLAGS+=$(AST_DECLARATION_AFTER_STATEMENT)
-  _ASTCFLAGS+=$(AST_FORTIFY_SOURCE)
   _ASTCFLAGS+=$(AST_TRAMPOLINES)
   _ASTCFLAGS+=-Wundef
   _ASTCFLAGS+=-Wmissing-format-attribute

Modified: branches/11/Makefile.rules
URL: http://svnview.digium.com/svn/asterisk/branches/11/Makefile.rules?view=diff&rev=417017&r1=417016&r2=417017
==============================================================================
--- branches/11/Makefile.rules (original)
+++ branches/11/Makefile.rules Sun Jun 22 15:52:19 2014
@@ -82,6 +82,8 @@
 # and if that doesn't fail then compile again with optimizer disabled
 ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS))$(AST_DEVMODE),DONT_OPTIMIZEyes)
 COMPILE_DOUBLE=yes
+else
+_ASTCFLAGS+=$(AST_FORTIFY_SOURCE)
 endif
 
 ifeq ($(findstring BUILD_NATIVE,$(MENUSELECT_CFLAGS)),BUILD_NATIVE)




More information about the svn-commits mailing list