Mail archive

[alpine-devel] main/gcc - 003_all_default-fortify-source.patch wording

From: Dean Takemori <>
Date: Mon, 14 Jan 2019 22:27:13 -1000

main/gcc - 003_all_default-fortify-source.patch

The text in the .texi part of the patch

        +NOTE: In Alpine Linux, _at_option{-D_FORTIFY_SOURCE=2} is
        +set by default, and is activated when _at_option{-O} is set to 2 or higher.

and the code/comment part of the patch

        + /* Fortify Source enabled by default for optimization levels > 0 */
        + if (optimize)
        + builtin_define_with_int_value ("_FORTIFY_SOURCE", 2);

don’t seem to match.

It’s unclear if the intention of the patch is to set FORTIFY_SOURCE on at -O/-O1 and higher or -O2 and higher, but either the documentation or the code needs to be fixed

Received on Mon Jan 14 2019 - 22:27:13 UTC