summaryrefslogtreecommitdiff
path: root/eclass/tests/toolchain-funcs.sh
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-11-10 13:21:36 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-11-10 13:21:36 +0000
commit77398e424e45d9e98c1cef3c43bdadb9d56e81ef (patch)
tree5aeffd3fc7b92fc615bd2c222fa8831aeda1925b /eclass/tests/toolchain-funcs.sh
parentbd4aeefe33e63f613512604e47bfca7b2187697d (diff)
gentoo resync : 10.11.2019
Diffstat (limited to 'eclass/tests/toolchain-funcs.sh')
-rwxr-xr-xeclass/tests/toolchain-funcs.sh24
1 files changed, 24 insertions, 0 deletions
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