[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-dev
Subject: [gentoo-dev] [PATCH 3/5] toolchain-funcs.eclass: include CXXFLAGS in various tc-enables-* checks
From: Sam James <sam () gentoo ! org>
Date: 2023-01-30 1:47:06
Message-ID: 20230130014708.2898311-3-sam () gentoo ! org
[Download RAW message or body]
SSP and PIE are relevant to C++ too.
Signed-off-by: Sam James <sam@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 d46104275f8e6..840111f6cc30d 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}
}
--
2.39.1
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic