[vlc-devel] [PATCH] build: Undef _FORTIFY_SOURCE before setting it

Rémi Denis-Courmont remi at remlab.net
Sun Nov 3 19:17:36 CET 2013


Le dimanche 3 novembre 2013 19:00:38 Luca Barbato a écrit :
> On 29/09/13 08:32, Luca Barbato wrote:
> > It is commonly present as part of the compiler defaults in some
> > distributions.

Flags that control glibc headers are the responsibility of the application, 
not the toolchain. This is no different from the other _*_SOURCE macros.
Otherwise, those things would presumably be compilation time option of glibc 
(or _compiler_ flags as opposed to _preprocessor_ flags).

I think you need to fix your packaging rules, more than you need to fix VLC.

> > ---
> > 
> > I forgot to send it since looong ago...
> > 
> >  configure.ac | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> > 
> > diff --git a/configure.ac b/configure.ac
> > index 3f6ab28..8da9722 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -54,7 +54,13 @@ dnl Check for tools
> > 
> >  dnl
> >  AC_PROG_CC_C99
> >  AC_USE_SYSTEM_EXTENSIONS
> > 
> > -AC_DEFINE([_FORTIFY_SOURCE], 2, [Define to 2 to get glibc warnings.])
> > +AH_VERBATIM([_FORTIFY_SOURCE],[
> > +#ifdef _FORTIFY_SOURCE

What's the point in that?

> > +#/**/undef/**/ _FORTIFY_SOURCE
> > +#define _FORTIFY_SOURCE 2
> > +#endif
> > +])
> > +dnl AC_DEFINE([_FORTIFY_SOURCE], 2, [Define to 2 to get glibc warnings.])
> > 
> >  AC_DEFINE([_FILE_OFFSET_BITS], 64, [Define to 64 for large files
> >  support.])
> >  AC_DEFINE([_REENTRANT],, [Define to expose reentrant functions.])
> >  AC_DEFINE([_THREAD_SAFE],, [Same as _REENTANT for some other OSes.])
> > 
> > --
> > 1.8.3.2
> 
> Ping =P
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list