gnucash maint: Add _FORTIFY_SOURCE directive only when compiling with optimization enabled
Mike Alexander
mta at umich.edu
Fri May 2 17:45:36 EDT 2014
--On May 2, 2014 7:37:52 PM +0200 Geert Janssens
<janssens-geert at telenet.be> wrote:
> 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.
Almost. Near the top of configure.ac the -O flag in CFLAGS is saved in
USER_OPTIMIZATION, but CFLAGS is not changed.. Then later if
--enable-debug is given all -O flags are removed from CFLAGS and any
saved in USER_OPTIMIZATION are added back in. The net result is that
the -O flag set before configure is called is used instead of any that
configure may have set prior to testing --enable-debug. In my case I
explicitly set -O0 if I'm doing a debug build. That may not be
necessary anymore, but it makes things explicit.
Mike
More information about the gnucash-devel
mailing list