summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2019-09-27 00:58:01 -0600
committerTim Harder <radhermit@gentoo.org>2019-09-27 03:10:53 -0600
commitcab160d3c614472e20f145e65a2d7f72bdf615b7 (patch)
treefe087fe6590a530486d6ef9cc927900a3d9673e0 /eclass
parentx11-wm/enlightenment: bump to 0.23.1 (diff)
downloadgentoo-cab160d3c614472e20f145e65a2d7f72bdf615b7.tar.gz
gentoo-cab160d3c614472e20f145e65a2d7f72bdf615b7.tar.bz2
gentoo-cab160d3c614472e20f145e65a2d7f72bdf615b7.zip
flag-o-matic.eclass: test-flag-PROG(): verify selected compiler exists
Before trying to use it. Fixes stricter phase running done by pkgcore which explicitly dies when encountering unknown commands. Closes: https://bugs.gentoo.org/695706 Signed-off-by: Tim Harder <radhermit@gentoo.org>
Diffstat (limited to '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