Comment 0 for bug 2016042

Revision history for this message
Mark Esler (eslerm) wrote :

This flag has a long history of distro use in Fedora [0] and is used
by Gentoo [1].

_GLIBCXX_ASSERTIONS was developed not to impact ABI or big-O complexity.

> The _GLIBCXX_ASSERTIONS macro defines a subset of the _GLIBCXX_DEBUG
> checks, with no impact on class layout and minimal impact on runtime
> (and no changes in algorithmic complexity). It is intended to be
> suitable for both debug builds and release builds.
[2]

As with -D_FORTIFY_SOURCE=3, poor quality code requires more mitigations
and therefore have higher performance penalties.

When Fedora initially added this default flag some packages FTBFS. Now
packages appear stable.

[0] https://src.fedoraproject.org/rpms/redhat-rpm-config/c/0d162176e9dba1adc330a9ee561b91c8e5e62cb5
[1] https://bugs.gentoo.org/876895
[2] https://bugs.launchpad.net/kicad/+bug/1838448/comments/40