Am 31.01.2013 11:15, schrieb Michal Privoznik: > Currently, we are enforcing the _FORTIFY_SOURCE=2 without any > previous detection if the macro has been already defined, e.g. > by environment, or is just enabled by compiler by default. > > Signed-off-by: Michal Privoznik <mpriv...@redhat.com> > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure b/configure > index b7635e4..97070eb 100755 > --- a/configure > +++ b/configure > @@ -3159,7 +3159,7 @@ if test "$gcov" = "yes" ; then > CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS" > LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS" > elif test "$debug" = "no" ; then > - CFLAGS="-O2 -D_FORTIFY_SOURCE=2 $CFLAGS" > + CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS" > fi > >
Should we maybe instead add a compile-test? #ifdef _FORTIFY_SOURCE #if _FORTIFY_SOURCE >= 2 #error Environment already has _FORTIFY_SOURCE #endif #endif I admit I have no clue what the number means and whether there are more fortified levels. Cheers, Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg