diff options
author | Sam James <sam@gentoo.org> | 2023-01-30 01:39:03 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-01-30 17:37:05 +0000 |
commit | 7c0da186180fe6fd6a23e3bee6fc019ade8a9bd9 (patch) | |
tree | 883fbd5afaa3e5ef1612996cf84cbb23a8825669 /eclass/toolchain-funcs.eclass | |
parent | toolchain-funcs.eclass: add tc-enables-cxx-assertions (diff) | |
download | gentoo-7c0da186180fe6fd6a23e3bee6fc019ade8a9bd9.tar.gz gentoo-7c0da186180fe6fd6a23e3bee6fc019ade8a9bd9.tar.bz2 gentoo-7c0da186180fe6fd6a23e3bee6fc019ade8a9bd9.zip |
toolchain-funcs.eclass: include CXXFLAGS in various tc-enables-* checks
SSP and PIE are relevant to C++ too.
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/toolchain-funcs.eclass')
-rw-r--r-- | eclass/toolchain-funcs.eclass | 8 |
1 files 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} } |