diff options
author | Sam James <sam@gentoo.org> | 2023-08-17 04:21:13 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-08-18 02:30:46 +0100 |
commit | bc7f9e5b77e202ba568eaaf0f6a5638e5c0f6f23 (patch) | |
tree | bd94b94d81bca902154072c2d2ce33985ec81e10 /eclass/flag-o-matic.eclass | |
parent | flag-o-matic.eclass: recognize -fstack-protector-strong in _filter-hardened (diff) | |
download | gentoo-bc7f9e5b77e202ba568eaaf0f6a5638e5c0f6f23.tar.gz gentoo-bc7f9e5b77e202ba568eaaf0f6a5638e5c0f6f23.tar.bz2 gentoo-bc7f9e5b77e202ba568eaaf0f6a5638e5c0f6f23.zip |
flag-o-matic.eclass: handle C++ assertions and FORTIFY_SOURCE in _filter-hardened
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/flag-o-matic.eclass')
-rw-r--r-- | eclass/flag-o-matic.eclass | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 70d39d034388..b4c27bf89d92 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -181,6 +181,16 @@ _filter-hardened() { is-flagq -fstrict-overflow || append-flags $(test-flags -fstrict-overflow) ;; + -D_GLIBCXX_ASSERTIONS|-D_LIBCPP_ENABLE_ASSERTIONS|-D_LIBCPP_ENABLE_HARDENED_MODE) + tc-enables-cxx-assertions || continue + + append-cppflags -U_GLIBCXX_ASSERTIONS -U_LIBCPP_ENABLE_ASSERTIONS -U_LIBCPP_ENABLE_HARDENED_MODE + ;; + -D_FORTIFY_SOURCE=*) + tc-enables-fortify-source || continue + + append-cppflags -U_FORTIFY_SOURCE + ;; esac done } |