Skip to content

Commit

Permalink
flag-o-matic.eclass: test-flag-PROG(): verify selected compiler exists
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
radhermit committed Sep 27, 2019
1 parent b4a65ff commit cab160d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion eclass/flag-o-matic.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cab160d

Please sign in to comment.