toolchain.eclass: fix tc-enables-* with -ggdb3
authorLuke Dashjr <luke-jr+git@utopios.org>
Tue, 8 Aug 2017 16:33:09 +0000 (16:33 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Thu, 10 Aug 2017 21:55:43 +0000 (22:55 +0100)
commit5f2d4eb56a6eba177bdf7134fe8e5f749ea67b90
tree319bf3fb7df92816409732e8ea1bb36f39eb22a5
parenta5b026cfa2a719820eec84c65f6900d326a77a21
toolchain.eclass: fix tc-enables-* with -ggdb3

-ggdb3 builds debug information for macros into binaries. For this reason,
the C preprocessor includes all #defines as-is in the output. The check
in tc-enables-* expects only a fixed output of "true", which fails in this
scenario.

To fix this, `grep` is used to look specifically for "true" in the output
from the preprocessor.

Closes: https://github.com/gentoo/gentoo/pull/5359
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Matthias Maier <tamiko@gentoo.org>
eclass/toolchain-funcs.eclass