gnucash maint: Add _FORTIFY_SOURCE directive only when compiling with optimization enabled

Geert Janssens janssens-geert at telenet.be
Fri May 2 13:37:52 EDT 2014


On Friday 02 May 2014 13:22:38 Mike Alexander wrote:
> On May 2, 2014, at 9:58 AM, Geert Janssens <gjanssens at code.gnucash.org> wrote:
> > Updated	 via  https://github.com/Gnucash/gnucash/commit/ca480862
> > (commit)> 
> > 	from  https://github.com/Gnucash/gnucash/commit/08c59b58 (commit)
> > 
> > commit ca48086287045c0af08b0dde62ce121e00a8e0c0
> > Author: Geert Janssens <janssens-geert at telenet.be>
> > Date:   Fri May 2 15:55:48 2014 +0200
> > 
> >    Add _FORTIFY_SOURCE directive only when compiling with
> >    optimization enabled
> This change seems to add _FORTIFY_SOURCE for any level of -O,
> including -O0.  Am I reading it correctly?  Does this work?  If so,
> that's why I didn't see the problem.  My build script always supplies
> a -O parameter, either -O0 or -O2 for debug or optimized builds
> respectively.  The error message seems to imply that you need an
> optimization level greater than 0 for _FORTIFY_SOURCE.
> 
>                Mike
Uhm that shows my limited understanding of gcc options. I think you are correct that it needs 
more than -O0 though I don't even know how to test that.

>From what I understand gnucash' configure script will strip out any -Ox if --enable-debug is set. 
Since I have this set I don't have any -Ox in CFLAGS anymore.

My gcc is 4.8.2 by the way. But I saw the same error the one time I built with clang a couple of 
days back.

Geert


More information about the gnucash-devel mailing list