summaryrefslogtreecommitdiff
path: root/eclass/flag-o-matic.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-10-13 21:54:24 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-10-13 21:54:24 +0100
commitda491770b9ba5f179e18db461c49cb6f1ccf0e1f (patch)
treed3e34a8bd906741ab18cf69d8d4f732853e26ade /eclass/flag-o-matic.eclass
parentad6182343997a405079870a2fe91c4e0c6b94595 (diff)
parent5a165c60b9b8c4847067cb83b4be7da785d01f93 (diff)
gentoo resync : 28.09.2019
Diffstat (limited to 'eclass/flag-o-matic.eclass')
-rw-r--r--eclass/flag-o-matic.eclass6
1 files changed, 5 insertions, 1 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index 3b32bd9d6319..89b259cc222f 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -435,8 +435,12 @@ test-flag-PROG() {
[[ -z ${comp} || -z $1 ]] && return 1
+ # verify selected compiler exists before using it
+ comp=$(tc-get${comp})
+ type -p ${comp} >/dev/null || return 1
+
local cmdline=(
- $(tc-get${comp})
+ ${comp}
# Clang will warn about unknown gcc flags but exit 0.
# Need -Werror to force it to exit non-zero.
-Werror