From: | Sergei Trofimovich <slyfox@g.o> | ||
---|---|---|---|
To: | Mattias Nissler <mnissler@××××××××.org> | ||
Cc: | gentoo-dev@l.g.o | ||
Subject: | Re: [gentoo-dev] Re: [PATCH] Fix tc-cpp-is-true to work with clang | ||
Date: | Wed, 06 Nov 2019 22:46:31 | ||
Message-Id: | 20191106224622.739f2a9f@sf | ||
In Reply to: | [gentoo-dev] Re: [PATCH] Fix tc-cpp-is-true to work with clang by Sergei Trofimovich |
1 | On Mon, 4 Nov 2019 20:18:11 +0000 |
2 | Sergei Trofimovich <slyfox@g.o> wrote: |
3 | |
4 | > On Mon, 4 Nov 2019 10:11:20 +0000 |
5 | > Mattias Nissler <mnissler@××××××××.org> wrote: |
6 | > |
7 | > > Clang's preprocessor likes to output a leading newline, which makes |
8 | > > the comparison always fail. GCC generates additional output with certain |
9 | > > flags (e.g. -ggdb3) as well. Hence, switch the test to trigger a |
10 | > > preprocessor error when the condition is not true and examine the exit |
11 | > > code. |
12 | > > |
13 | > > Bug: https://bugs.gentoo.org/698912 |
14 | > > |
15 | > > Signed-off-by: Mattias Nissler <mnissler@××××××××.org> |
16 | > > --- |
17 | > > eclass/toolchain-funcs.eclass | 15 +++++++-------- |
18 | > > 1 file changed, 7 insertions(+), 8 deletions(-) |
19 | > |
20 | > Looks good! I'll pull it in to ::gentoo in a few days. |
21 | |
22 | Pushed to ::gentoo as: |
23 | https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ef6b33339da7bb04afd77e1bc5db011b02d658a |
24 | Also while at it added basic regression test: |
25 | https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f02136721af40dd89a09101504750fb28f8142e |
26 | |
27 | -- |
28 | |
29 | Sergei |