commit: 7c0da186180fe6fd6a23e3bee6fc019ade8a9bd9
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 30 01:39:03 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan 30 17:37:05 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c0da186
toolchain-funcs.eclass: include CXXFLAGS in various tc-enables-* checks
SSP and PIE are relevant to C++ too.
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/toolchain-funcs.eclass | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index d46104275f8e..840111f6cc30 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -1012,7 +1012,7 @@ tc-enables-cxx-assertions() {
# Return truth if the current compiler generates position-independent code
(PIC)
# which can be linked into executables.
tc-enables-pie() {
- tc-cpp-is-true "defined(__PIE__)" ${CPPFLAGS} ${CFLAGS}
+ tc-cpp-is-true "defined(__PIE__)" ${CPPFLAGS} ${CFLAGS} ${CXXFLAGS}
}
# @FUNCTION: tc-enables-fortify-source
@@ -1033,7 +1033,7 @@ tc-enables-fortify-source() {
# -fstack-protector-strong
# -fstack-protector-all
tc-enables-ssp() {
- tc-cpp-is-true "defined(__SSP__) || defined(__SSP_STRONG__) ||
defined(__SSP_ALL__)" ${CPPFLAGS} ${CFLAGS}
+ tc-cpp-is-true "defined(__SSP__) || defined(__SSP_STRONG__) ||
defined(__SSP_ALL__)" ${CPPFLAGS} ${CFLAGS} ${CXXFLAGS}
}
# @FUNCTION: tc-enables-ssp-strong
@@ -1044,7 +1044,7 @@ tc-enables-ssp() {
# -fstack-protector-strong
# -fstack-protector-all
tc-enables-ssp-strong() {
- tc-cpp-is-true "defined(__SSP_STRONG__) || defined(__SSP_ALL__)"
${CPPFLAGS} ${CFLAGS}
+ tc-cpp-is-true "defined(__SSP_STRONG__) || defined(__SSP_ALL__)"
${CPPFLAGS} ${CFLAGS} ${CXXFLAGS}
}
# @FUNCTION: tc-enables-ssp-all
@@ -1054,7 +1054,7 @@ tc-enables-ssp-strong() {
# on level corresponding to any of the following options:
# -fstack-protector-all
tc-enables-ssp-all() {
- tc-cpp-is-true "defined(__SSP_ALL__)" ${CPPFLAGS} ${CFLAGS}
+ tc-cpp-is-true "defined(__SSP_ALL__)" ${CPPFLAGS} ${CFLAGS} ${CXXFLAGS}
}