On Fri, Dec 09, 2011 at 09:50:39PM +0100, Bram Moolenaar wrote:
> 
> James McCoy wrote:
> 
> > On Thu, Dec 08, 2011 at 03:17:52PM +0100, Bram Moolenaar wrote:
> > > 
> > > Patch 7.3.368
> > > Problem:    Gcc complains about redefining _FORTIFY_SOURCE.
> > > Solution:   Undefine it before redefining it.
> > > Files:        src/Makefile, src/configure.in, src/auto/configure
> > > 
> > > 
> > > *** ../vim-7.3.367/src/Makefile   2011-10-20 16:35:25.000000000 +0200
> > > --- src/Makefile  2011-12-08 15:16:13.000000000 +0100
> > > ***************
> > > *** 561,568 ****
> > >   #CFLAGS = -g -O2 '-DSTARTUPTIME="vimstartup"' -fno-strength-reduce 
> > > -Wall -Wmissing-prototypes
> > >   
> > >   # Use this with GCC to check for mistakes, unused arguments, etc.
> > > ! #CFLAGS = -g -Wall -Wextra -Wmissing-prototypes -Wunreachable-code 
> > > -D_FORTIFY_SOURCE=1
> > > ! #CFLAGS = -g -O2 -Wall -Wextra -Wmissing-prototypes -D_FORTIFY_SOURCE=1 
> > > -DU_DEBUG
> > 
> > _FORTIFY_SOURCE is actually supposed to be in CPPFLAGS, so anything
> > building Vim with it specified in the proper environment variable won't
> > be caught by configure's checks.
> 
> What makes you think that _FORTIFY_SOURCE should be in CPPFLAGS?  Do you
> have a reference?

-D defines a macro with the given name, therefore it's handled by the C
preprocessor and should be in CPPFLAGS.  Also, see GCC's documentation[0] for
-D.

[0]: 
http://gcc.gnu.org/onlinedocs/gcc-4.6.2/gcc/Preprocessor-Options.html#Preprocessor-Options
-- 
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <[email protected]>

Attachment: signature.asc
Description: Digital signature

Raspunde prin e-mail lui