sys-apps/acl: use tc-enables-fortify-source

Better than fragile optimisation level checking.

Bug: https://bugs.gentoo.org/841770
Bug: https://bugs.gentoo.org/847280
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2023-08-06 12:43:26 +01:00
parent 5a84e57a19
commit cc9abc19ce
2 changed files with 4 additions and 8 deletions

View File

@@ -3,7 +3,7 @@
EAPI=7
inherit flag-o-matic libtool multilib-minimal usr-ldscript
inherit flag-o-matic libtool multilib-minimal toolchain-funcs usr-ldscript
DESCRIPTION="Access control list utilities, libraries, and headers"
HOMEPAGE="https://savannah.nongnu.org/projects/acl"
@@ -42,9 +42,7 @@ multilib_src_configure() {
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104964
# https://savannah.nongnu.org/bugs/index.php?62519
# bug #847280
if is-flagq '-O[23]' || is-flagq '-Ofast' ; then
# We can't unconditionally do this b/c we fortify needs
# some level of optimisation.
if tc-enables-fortify-source ; then
filter-flags -D_FORTIFY_SOURCE=3
append-cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
fi

View File

@@ -3,7 +3,7 @@
EAPI=7
inherit flag-o-matic libtool multilib-minimal usr-ldscript
inherit flag-o-matic libtool multilib-minimal toolchain-funcs usr-ldscript
DESCRIPTION="Access control list utilities, libraries, and headers"
HOMEPAGE="https://savannah.nongnu.org/projects/acl"
@@ -46,9 +46,7 @@ multilib_src_configure() {
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104964
# https://savannah.nongnu.org/bugs/index.php?62519
# bug #847280
if is-flagq '-O[23]' || is-flagq '-Ofast' ; then
# We can't unconditionally do this b/c we fortify needs
# some level of optimisation.
if tc-enables-fortify-source ; then
filter-flags -D_FORTIFY_SOURCE=3
append-cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
fi