Author: mjordan
Date: Sun Aug 17 17:33:21 2014
New Revision: 421229

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=421229
Log:
configure: Undefine FORTIFY_SOURCE prior to defining it for patched gcc

Some distributions of Linux patch gcc to define FORTIFY_SOURCE when gcc is
executed with optimization. This "help" unfortunately results in re-definition
warnings when FORTIFY_SOURCE is later defined in Asterisk's build system. This
patch undefines FORTIFY_SOURCE prior to defining it to prevent this warning.

Review: https://reviewboard.asterisk.org/r/3912/

ASTERISK-24032 #close
Reported by: Kilburn
Tested by: Kilburn, wdoekes
patches:
  1.8.diff uploaded by cloos (License 5956)
  10.diff uploaded by cloos (License 5956)
  11.diff uploaded by cloos (License 5956)
  12.diff uploaded by cloos (License 5956)
  13.diff uploaded by cloos (License 5956)
........

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

Merged revisions 421228 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    branches/12/   (props changed)
    branches/12/configure
    branches/12/configure.ac

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

Modified: branches/12/configure.ac
URL: 
http://svnview.digium.com/svn/asterisk/branches/12/configure.ac?view=diff&rev=421229&r1=421228&r2=421229
==============================================================================
--- branches/12/configure.ac (original)
+++ branches/12/configure.ac Sun Aug 17 17:33:21 2014
@@ -1044,9 +1044,9 @@
 AC_SUBST(AST_TRAMPOLINES)
 
 AC_MSG_CHECKING(for _FORTIFY_SOURCE support)
-if $(${CC} -D_FORTIFY_SOURCE=2 -S -o /dev/null -xc /dev/null > /dev/null 
2>&1); then
+if $(${CC} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -S -o /dev/null -xc /dev/null 
> /dev/null 2>&1); then
        AC_MSG_RESULT(yes)
-       AST_FORTIFY_SOURCE=-D_FORTIFY_SOURCE=2
+       AST_FORTIFY_SOURCE="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
 else
        AC_MSG_RESULT(no)
        AST_FORTIFY_SOURCE=


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to