commit:     1dd3378347f15c27b82237443f3a4825b4e70b3d
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 17 03:17:05 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Aug 18 01:30:15 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1dd33783

toolchain-funcs.eclass: tc-enables-fortify-source: update for newer libcxx

Newer libcxx uses _LIBCPP_ENABLE_HARDENED_MODE instead of 
_LIBCPP_ENABLE_ASSERTIONS
which is now deprecated.

Bug: https://bugs.gentoo.org/912223
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/toolchain-funcs.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index e28f6148ddc1..556bbac35307 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -963,9 +963,9 @@ gcc-specs-stack-check() {
 # @DESCRIPTION:
 # Return truth if the current compiler enables assertions in the C++ standard
 # library. For libstdc++, this is -D_GLIBCXX_ASSERTIONS, and for libcxx/libc++,
-# this is -D_LIBCPP_ENABLE_ASSERTIONS.
+# this is -D_LIBCPP_ENABLE_ASSERTIONS (deprecated) or 
-D_LIBCPP_ENABLE_HARDENED_MODE.
 tc-enables-cxx-assertions() {
-       tc-cpp-is-true "defined(_GLIBCXX_ASSERTIONS) || 
defined(_LIBCPP_ENABLE_ASSERTIONS)" ${CPPFLAGS} ${CXXFLAGS}
+       tc-cpp-is-true "defined(_GLIBCXX_ASSERTIONS) || 
defined(_LIBCPP_ENABLE_ASSERTIONS) || defined(_LIBCPP_ENABLE_HARDENED_MODE)" 
${CPPFLAGS} ${CXXFLAGS}
 }
 
 # @FUNCTION: tc-enables-pie

Reply via email to