Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Mon, 30 Jan 2023 17:37:27
Message-Id: 1675100225.7c0da186180fe6fd6a23e3bee6fc019ade8a9bd9.sam@gentoo
1 commit: 7c0da186180fe6fd6a23e3bee6fc019ade8a9bd9
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 30 01:39:03 2023 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 30 17:37:05 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c0da186
7
8 toolchain-funcs.eclass: include CXXFLAGS in various tc-enables-* checks
9
10 SSP and PIE are relevant to C++ too.
11
12 Signed-off-by: Sam James <sam <AT> gentoo.org>
13
14 eclass/toolchain-funcs.eclass | 8 ++++----
15 1 file changed, 4 insertions(+), 4 deletions(-)
16
17 diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
18 index d46104275f8e..840111f6cc30 100644
19 --- a/eclass/toolchain-funcs.eclass
20 +++ b/eclass/toolchain-funcs.eclass
21 @@ -1012,7 +1012,7 @@ tc-enables-cxx-assertions() {
22 # Return truth if the current compiler generates position-independent code (PIC)
23 # which can be linked into executables.
24 tc-enables-pie() {
25 - tc-cpp-is-true "defined(__PIE__)" ${CPPFLAGS} ${CFLAGS}
26 + tc-cpp-is-true "defined(__PIE__)" ${CPPFLAGS} ${CFLAGS} ${CXXFLAGS}
27 }
28
29 # @FUNCTION: tc-enables-fortify-source
30 @@ -1033,7 +1033,7 @@ tc-enables-fortify-source() {
31 # -fstack-protector-strong
32 # -fstack-protector-all
33 tc-enables-ssp() {
34 - tc-cpp-is-true "defined(__SSP__) || defined(__SSP_STRONG__) || defined(__SSP_ALL__)" ${CPPFLAGS} ${CFLAGS}
35 + tc-cpp-is-true "defined(__SSP__) || defined(__SSP_STRONG__) || defined(__SSP_ALL__)" ${CPPFLAGS} ${CFLAGS} ${CXXFLAGS}
36 }
37
38 # @FUNCTION: tc-enables-ssp-strong
39 @@ -1044,7 +1044,7 @@ tc-enables-ssp() {
40 # -fstack-protector-strong
41 # -fstack-protector-all
42 tc-enables-ssp-strong() {
43 - tc-cpp-is-true "defined(__SSP_STRONG__) || defined(__SSP_ALL__)" ${CPPFLAGS} ${CFLAGS}
44 + tc-cpp-is-true "defined(__SSP_STRONG__) || defined(__SSP_ALL__)" ${CPPFLAGS} ${CFLAGS} ${CXXFLAGS}
45 }
46
47 # @FUNCTION: tc-enables-ssp-all
48 @@ -1054,7 +1054,7 @@ tc-enables-ssp-strong() {
49 # on level corresponding to any of the following options:
50 # -fstack-protector-all
51 tc-enables-ssp-all() {
52 - tc-cpp-is-true "defined(__SSP_ALL__)" ${CPPFLAGS} ${CFLAGS}
53 + tc-cpp-is-true "defined(__SSP_ALL__)" ${CPPFLAGS} ${CFLAGS} ${CXXFLAGS}
54 }