• [gentoo-dev] [PATCH 3/5] toolchain-funcs.eclass: include CXXFLAGS in va

    From Sam James@21:1/5 to All on Mon Jan 30 02:50:01 2023
    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} ${C