[vlc-devel] [PATCH 1/1] build: define _FORTIFY_SOURCE only if it is not already defined

Janne Grunau janne-vlc at jannau.net
Wed Aug 31 22:05:58 CEST 2016

On 2016-08-27 23:11:02 +0200, remi at remlab.net wrote:
>    Hello,
>    Le 27 aout 2016 17:01, Janne Grunau <janne-vlc at jannau.net> a ecrit :
>    >
>    > On 2016-08-13 18:48:47 +0200, Janne Grunau wrote:
>    > > Fixes "_FORTIFY_SOURCE redefined" warnings in every file which
>    includes
>    > > config.h if _FORTIFY_SOURCE is predefined by the toolchain.
>    Broken toolchain, fix toolchain. Nack.
>    The _whole_ point of _FORTIFY_SOURCE is to be able to set it in the
>    program or packaging rule. The toolchain has no business setting it, as
>    any other "feature" macro.

I don't see a significant difference between pre-defining 
_FORTIFY_SOURCE via gcc specs or CFLAGS/CXXFLAGS in packaging rules. 
Both cause a massive amount of unnessary "_FORTIFY_SOURCE redefined" 
warnings. There are package build systems which define _FORTIFY_SOURCE 
for all packages. I'll happily resubmit the patch with an updated 
description mentioning only packaging rules.


More information about the vlc-devel mailing list