From 77398e424e45d9e98c1cef3c43bdadb9d56e81ef Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 10 Nov 2019 13:21:36 +0000 Subject: gentoo resync : 10.11.2019 --- eclass/tests/toolchain-funcs.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'eclass/tests') diff --git a/eclass/tests/toolchain-funcs.sh b/eclass/tests/toolchain-funcs.sh index bcf57f78201a..79ba6fa407b5 100755 --- a/eclass/tests/toolchain-funcs.sh +++ b/eclass/tests/toolchain-funcs.sh @@ -172,4 +172,28 @@ if type -P pathcc &>/dev/null; then tend $? fi +for compiler in gcc clang; do + if type -P ${compielr} &>/dev/null; then + tbegin "tc-cpp-is-true ($compiler, defined)" + ( + export CC=${compiler} + tc-cpp-is-true "defined(SOME_DEFINED_SYMBOL)" -DSOME_DEFINED_SYMBOL + ) + tend $? + tbegin "tc-cpp-is-true ($compiler, not defined)" + ( + export CC=${compiler} + ! tc-cpp-is-true "defined(SOME_UNDEFINED_SYMBOL)" + ) + tend $? + + tbegin "tc-cpp-is-true ($compiler, defined on -ggdb3)" + ( + export CC=${compiler} + tc-cpp-is-true "defined(SOME_DEFINED_SYMBOL)" -DSOME_DEFINED_SYMBOL -ggdb3 + ) + tend $? + fi +done + texit -- cgit v1.2.3