Skip to content

configure.ac: Unconditionally defining _FORTIFY_SOURCE=2 overrides _FORTIFY_SOURCE=3 #58

@chrfranke

Description

@chrfranke

Many recent distros provide GCC >= 12.0 which supports __builtin_dynamic_object_size():
https://gcc.gnu.org/onlinedocs/gcc/Object-Size-Checking.html

This is used instead of __builtin_object_size() by newer CRT includes if _FORTIFY_SOURCE=3 is set.

Compiler presets or packaging support tools now often default to _FORTIFY_SOURCE=3 which would be downgraded by these lines of configure.ac:

CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -Wall -g"
CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2 -Wall -g"

(A similar problem may be the -g which may override -ggdb)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions